From c0eccec4a4de1aedfe89d507f4c59f697323fe50 Mon Sep 17 00:00:00 2001 From: Quentin Defenouillere Date: Mon, 4 Feb 2019 15:01:15 +0100 Subject: [PATCH] [cragr] Use go_to_account_space() for get_profile and advisor We are quite often logged out when trying to switch from one space ot the other. The go_to_accounts_space() already takes this in consideration and tries to relogin when it happens, so we should use this method in get_profile and advisor in order to avoid being disconnected and not handling it. Closes: 36099@sibi --- modules/cragr/api/browser.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/cragr/api/browser.py b/modules/cragr/api/browser.py index 2f400eb4d3..a2ed7a688c 100644 --- a/modules/cragr/api/browser.py +++ b/modules/cragr/api/browser.py @@ -473,7 +473,7 @@ def iter_investment(self, account): @need_login def iter_advisor(self): - self.contracts_page.go(id_contract=0) + self.go_to_account_space(0) owner_type = self.page.get_owner_type() self.profile_page.go() if owner_type == 'PRIV': @@ -490,7 +490,7 @@ def iter_advisor(self): @need_login def get_profile(self): # There is one profile per space, so we only fetch the first one - self.contracts_page.go(id_contract=0) + self.go_to_account_space(0) owner_type = self.page.get_owner_type() self.profile_page.go() if owner_type == 'PRIV': -- GitLab