Commit ccd96d69 authored by Damien Mat's avatar Damien Mat Committed by Vincent A

[creditmutuel] Fix: form to load more transactions

A logger signaled that additionnal transactions where no longer loaded,
compared to the minimal list shown when reaching OperationsPage the
first time.

Now get_form has been updated.
parent fcd73bf5
......@@ -655,13 +655,13 @@ class CreditMutuelBrowser(TwoFactorBrowser):
# Need to reach the page with all transactions
if not self.page.has_more_operations():
break
form = self.page.get_form(id="I1:P:F")
form = self.page.get_form(xpath='//form[contains(@action, "_pid=AccountMasterDetail")]')
form['_FID_DoLoadMoreTransactions'] = ''
form['_wxf2_pseq'] = page
form.submit()
# IndexError when form xpath returns [], StopIteration if next called on empty iterable
except (StopIteration, FormNotFound):
self.logger.warning('Could not get history on new website')
self.logger.warning('Could not get more history on new website')
except IndexError:
# 6 months history is not available
pass
......
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