do not crash when there is no full list page
This commit is contained in:
parent
af8d42c279
commit
1c71ab7a76
2 changed files with 8 additions and 4 deletions
|
|
@ -88,10 +88,11 @@ class BanquePopulaire(BaseBrowser):
|
||||||
if self.page.is_error():
|
if self.page.is_error():
|
||||||
raise BrokenPageError('Unable to go on the accounts list page')
|
raise BrokenPageError('Unable to go on the accounts list page')
|
||||||
|
|
||||||
self.select_form(nr=0)
|
if self.page.is_short_list():
|
||||||
self.set_all_readonly(False)
|
self.select_form(nr=0)
|
||||||
self['dialogActionPerformed'] = 'EQUIPEMENT_COMPLET'
|
self.set_all_readonly(False)
|
||||||
self.submit()
|
self['dialogActionPerformed'] = 'EQUIPEMENT_COMPLET'
|
||||||
|
self.submit()
|
||||||
|
|
||||||
self.token = self.page.get_token()
|
self.token = self.page.get_token()
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -210,6 +210,9 @@ class AccountsPage(BasePage):
|
||||||
|
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
def is_short_list(self):
|
||||||
|
return len(self.document.xpath('//script[contains(text(), "EQUIPEMENT_COMPLET")]')) > 0
|
||||||
|
|
||||||
def get_list(self):
|
def get_list(self):
|
||||||
account_type = Account.TYPE_UNKNOWN
|
account_type = Account.TYPE_UNKNOWN
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue