From 724710f82f4831311bce95d395d5170943684f8c Mon Sep 17 00:00:00 2001 From: Quentin Defenouillere Date: Fri, 15 Nov 2019 10:36:07 +0100 Subject: [PATCH] =?UTF-8?q?[cragr]=20Regions:=20added=20logger=20to=20veri?= =?UTF-8?q?fy=20that=20all=20AccountsPage=20have=20"Synth=C3=A8se=20compte?= =?UTF-8?q?s"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/cragr/regions/pages.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/cragr/regions/pages.py b/modules/cragr/regions/pages.py index ceec7097e2..8f49ed8119 100644 --- a/modules/cragr/regions/pages.py +++ b/modules/cragr/regions/pages.py @@ -276,6 +276,11 @@ def get_iban(self): class AccountsPage(LoggedPage, CragrPage): + def on_load(self): + # Verify that all accounts page have the text 'Synthèse comptes' + if not CleanText('//h1[contains(text(), "Synthèse comptes")]')(self.doc): + self.logger.warning('We found an AccountsPage without the "Synthèse comptes" text.') + def no_other_perimeter(self): return not CleanText('//a[@title="Espace Autres Comptes"]')(self.doc) -- GitLab