From e447b303db450e10df743fda12456c0156640a0d Mon Sep 17 00:00:00 2001 From: Fong NGO Date: Thu, 26 Jul 2018 11:59:34 +0200 Subject: [PATCH] [fortuneo] only call has_action_needed method when on AccountList page The iframe destination tends to change, and isn't always an AccountList page. However, we test the existence of CGUs on the AccountsList page, and this is why we need to ensure we are on a AccountList page beforehand. Closes: 14153@sibi 13797@sibi --- modules/fortuneo/browser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/fortuneo/browser.py b/modules/fortuneo/browser.py index 20d7f5191..f7c5a2589 100644 --- a/modules/fortuneo/browser.py +++ b/modules/fortuneo/browser.py @@ -120,7 +120,7 @@ class Fortuneo(LoginBrowser): self.location(self.absurl(url, base=True)) # beware, the landing page might vary according to the referer page. So far I didn't figure out how the landing page is chosen. # if there are skippable CGUs, skip them - if self.page.has_action_needed(): + if self.accounts_page.is_here() and self.page.has_action_needed(): # Look for the request in the event listener registered to the button # can be harcoded, no variable part. It is a POST request without data. self.location(self.absurl('ReloadContext?action=1&', base=True), method='POST') -- 2.24.1