CrAgr: fixed regression induced by commit cb906211
This commit is contained in:
parent
ae782c02db
commit
7f3c4be18b
1 changed files with 6 additions and 5 deletions
|
|
@ -72,10 +72,11 @@ class Cragr(BaseBrowser):
|
||||||
raise BrowserIncorrectPassword()
|
raise BrowserIncorrectPassword()
|
||||||
|
|
||||||
def get_accounts_list(self):
|
def get_accounts_list(self):
|
||||||
self.home()
|
# FIXME we call the login() method that will redirect to the accounts list page.
|
||||||
# if there is no redirection but we are connected, go to a page that will be recognized
|
# However, if we are already logged, using the "Comptes" link would be a better approach.
|
||||||
# as the account list page
|
# Something like //img[contains(@alt, "Comptes")] may be generic enough.
|
||||||
# this is a hack, a better solution would be to recognize the page regardless of the URL
|
# Note the same hack is used in the do_transfer method.
|
||||||
|
self.login()
|
||||||
return self.page.get_list()
|
return self.page.get_list()
|
||||||
|
|
||||||
def home(self):
|
def home(self):
|
||||||
|
|
@ -120,7 +121,7 @@ class Cragr(BaseBrowser):
|
||||||
"""
|
"""
|
||||||
# access the transfer page
|
# access the transfer page
|
||||||
transfer_page_unreachable_message = u'Could not reach the transfer page.'
|
transfer_page_unreachable_message = u'Could not reach the transfer page.'
|
||||||
self.home()
|
self.login()
|
||||||
if not self.page.is_accounts_list():
|
if not self.page.is_accounts_list():
|
||||||
raise TransferError(transfer_page_unreachable_message)
|
raise TransferError(transfer_page_unreachable_message)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue