From ccd96d694cf74e5a15e340f8b994357525df4019 Mon Sep 17 00:00:00 2001 From: Damien Mat Date: Wed, 6 Jan 2021 13:02:18 +0100 Subject: [PATCH] [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. --- modules/creditmutuel/browser.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/creditmutuel/browser.py b/modules/creditmutuel/browser.py index 4d3eb085ea..7785f3b5f6 100644 --- a/modules/creditmutuel/browser.py +++ b/modules/creditmutuel/browser.py @@ -655,13 +655,13 @@ def list_operations(self, page, account): # 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 -- GitLab