CrAgr: added Richard Genoud's patch handling "See 25 more" links.

Add full history on account page: on CA centre france (and maybe others),
there's no "next page" link but a "see 25 more" link. So, we have to expand the
history before fetching results
This commit is contained in:
Xavier G 2011-08-22 23:27:03 +02:00 committed by Romain Bignon
commit 498d168a7f
2 changed files with 25 additions and 0 deletions

View file

@ -115,6 +115,19 @@ class AccountsList(CragrBasePage):
def get_transfer_target_accounts(self):
return self.get_transfer_accounts('numCompteBeneficiaire')
def expand_history_page_url(self):
"""
When on a page dedicated to list the history of a specific account (see
is_account_page), returns the link to expand the history with 25 more results,
or False if the link is not present.
"""
# tested on CA centre france
a = self.document.xpath('/html/body//div[@class="navlink"]//a[contains(text(), "Voir les 25 suivants")]')
if not a:
return False
else:
return a[0].get('href', '')
def next_page_url(self):
"""
When on a page dedicated to list the history of a specific account (see