From e282c52543d3c7f8870204ba42ffae7160c7fb92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9lande=20Adrien?= Date: Fri, 15 Nov 2019 09:46:38 +0100 Subject: [PATCH] [cragr] handle an other savings history page When a savings account does not have transactions, a page appears telling that there is no transactions. But this page instead of being titled "HISTORIQUE DES OPERATIONS" is only titled "OPERATIONS". So this page was detected as an AccountsPage because not matching the `is_here`. Causing an issue at the `iter_perimeter_accounts`, because when looking for the `refreshed_account`, it may not be on the right page. So now the pages titled "OPERATIONS" are considered `OtherSavingsHistoryPage`. Closes: 49916@sibi --- modules/cragr/regions/pages.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/cragr/regions/pages.py b/modules/cragr/regions/pages.py index 4650c4d0a0..ceec7097e2 100644 --- a/modules/cragr/regions/pages.py +++ b/modules/cragr/regions/pages.py @@ -681,7 +681,7 @@ def obj_date(self): class OtherSavingsHistoryPage(LoggedPage, CragrPage): def is_here(self): - return CleanText('//span[@class="tdb-cartes-prop"]/b[contains(text(), "HISTORIQUE DES OPERATIONS")]')(self.doc) + return CleanText('//span[@class="tdb-cartes-prop"]/b[contains(text(), "HISTORIQUE DES OPERATIONS") or text()="OPERATIONS"]')(self.doc) @pagination @method -- GitLab