diff --git a/modules/creditmutuel/browser.py b/modules/creditmutuel/browser.py index 55fa7aecee4cca4fdeec68ec26eaef8fca92ab11..9f55afd85c8de98f5ca0fc49d83517d0cdadfd44 100644 --- a/modules/creditmutuel/browser.py +++ b/modules/creditmutuel/browser.py @@ -48,7 +48,7 @@ CardsOpePage, NewAccountsPage, InternalTransferPage, ExternalTransferPage, RevolvingLoanDetails, RevolvingLoansList, ErrorPage, SubscriptionPage, NewCardsListPage, CardPage2, FiscalityConfirmationPage, - ConditionsPage, + ConditionsPage, MobileConfirmationPage, ) @@ -71,6 +71,7 @@ class CreditMutuelBrowser(LoginBrowser, StatesMixin): accounts = URL(r'/(?P.*)fr/banque/situation_financiere.cgi', r'/(?P.*)fr/banque/situation_financiere.html', AccountsPage) + mobile_confirmation = URL(r'/(?P.*)fr/banque/validation.aspx', MobileConfirmationPage) revolving_loan_list = URL(r'/(?P.*)fr/banque/CR/arrivee.asp\?fam=CR.*', RevolvingLoansList) revolving_loan_details = URL(r'/(?P.*)fr/banque/CR/cam9_vis_lstcpt.asp.*', RevolvingLoanDetails) user_space = URL(r'/(?P.*)fr/banque/espace_personnel.aspx', diff --git a/modules/creditmutuel/pages.py b/modules/creditmutuel/pages.py index 3eb2fdef8c6422a3da19ee63db182b46f9dc2006..d24cab2e4cc2ad36114d28e22bc2f9a6c6a9a3ff 100644 --- a/modules/creditmutuel/pages.py +++ b/modules/creditmutuel/pages.py @@ -105,6 +105,18 @@ class FiscalityConfirmationPage(LoggedPage, HTMLPage): pass +class MobileConfirmationPage(LoggedPage, HTMLPage): + # We land on this page for some connections, but can still bypass this verification for now + def on_load(self): + link = Attr('//a[contains(text(), "Accéder à mon Espace Client sans Confirmation Mobile")]', 'href', default=None)(self.doc) + if link: + self.logger.warning('This connexion is bypassing mobile confirmation') + self.browser.location(link) + else: + self.logger.warning('This connexion cannot bypass mobile confirmation') + assert False, 'This connexion cannot bypass mobile confirmation' + + class EmptyPage(LoggedPage, HTMLPage): REFRESH_MAX = 10.0