From ceab189f46572288383ad4b85ddb472647f3dfab Mon Sep 17 00:00:00 2001 From: Martin Lavoie Date: Fri, 4 Jun 2021 09:17:47 +0200 Subject: [PATCH] [americanexpress] Add a missing page on a selenium browser The selenium crash when trying to create a response for a url without a page class. It didn't seem a problem at first. It could be related to the network of the computer or some other configuration (python 2?). --- modules/americanexpress/browser.py | 4 ++-- modules/americanexpress/pages.py | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/americanexpress/browser.py b/modules/americanexpress/browser.py index 66dd409078..2d3d2e63d9 100644 --- a/modules/americanexpress/browser.py +++ b/modules/americanexpress/browser.py @@ -42,7 +42,7 @@ JsonBalances2, CurrencyPage, LoginPage, NoCardPage, NotFoundPage, HomeLoginPage, ReadAuthChallengePage, UpdateAuthTokenPage, - SLoginPage, + SHomePage, SLoginPage, ) from .fingerprint import FingerprintPage @@ -487,7 +487,7 @@ def iter_coming(self, account): class AmericanExpressSeleniumFingerprintBrowser(SeleniumBrowser): BASEURL = 'https://global.americanexpress.com' - home_login = URL(r'/login\?inav=fr_utility_logout') + home_login = URL(r'/login\?inav=fr_utility_logout', SHomePage) login = URL(r'https://www.americanexpress.com/en-us/account/login', SLoginPage) HEADLESS = True # Always change to True for prod diff --git a/modules/americanexpress/pages.py b/modules/americanexpress/pages.py index cc5f0a78fc..00180a3811 100644 --- a/modules/americanexpress/pages.py +++ b/modules/americanexpress/pages.py @@ -237,5 +237,9 @@ def obj_original_amount(self): obj__ref = Dict('identifier') +class SHomePage(SeleniumPage): + pass + + class SLoginPage(SeleniumPage): pass -- GitLab