From 9c92cfa8b7ec1dddeee0c57fbea94aa49d835d09 Mon Sep 17 00:00:00 2001 From: Benjamin Tampigny Date: Thu, 29 Oct 2020 11:45:58 +0100 Subject: [PATCH] [hsbc] let children page declare conditions for account page presence --- modules/hsbc/pages/account_pages.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/hsbc/pages/account_pages.py b/modules/hsbc/pages/account_pages.py index ae932d3bd0..260deb1114 100644 --- a/modules/hsbc/pages/account_pages.py +++ b/modules/hsbc/pages/account_pages.py @@ -141,11 +141,13 @@ def filter(self, text): class AccountsPage(GenericLandingPage): + IS_HERE_CONDITIONS = '//p[contains(text(), "Tous mes comptes au ")]|//span[contains(text(), "Tous mes comptes au ")]' + def is_here(self): return ( CleanText('//h1[contains(text(), "Synthèse")]')(self.doc) or CleanText( - '//p[contains(text(), "Tous mes comptes au ")]|//span[contains(text(), "Tous mes comptes au ")]' + self.IS_HERE_CONDITIONS )(self.doc) ) -- GitLab