Commit 9b355e9a authored by Quentin Defenouillere's avatar Quentin Defenouillere Committed by Romain Bignon

s2e/bnpes] Handle unavailable history form

Sometimes the history form to show more transactions is not available
and the module crashes with FormNotFound()

Closes: 16439@sibi
parent cee58456
......@@ -146,9 +146,9 @@ class S2eBrowser(LoginBrowser, StatesMixin):
# Get more transactions on each page"50")
for tr in
yield tr
for tr in
yield tr
# Go back to first page
......@@ -504,7 +504,10 @@ class HistoryPage(LoggedPage, MultiPage):
return form
def show_more(self, nb):
form = self.get_form(self.XPATH_FORM)
form = self.get_form(self.XPATH_FORM)
except FormNotFound:
return False
for select in self.doc.xpath('//select'):
if Attr('./option[@selected]', 'value')(select) == nb:
......@@ -513,6 +516,7 @@ class HistoryPage(LoggedPage, MultiPage):
if 'javax.faces.source' not in form:
form['javax.faces.source'] = idt
return True
def go_start(self):
idt = Attr('//a[@title="debut" or @title="precedent"]', 'id', default=None)(self.doc)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment