From 3b542a47820b35f8b2e0a0fe5fdbb3b228582b85 Mon Sep 17 00:00:00 2001 From: Maxime Gasselin Date: Wed, 7 Nov 2018 12:12:53 +0100 Subject: [PATCH] [bnporc-entreprise] Fix Market page when no account is present The account table is present when no account is present, we need to add condition to avoid research account in this case. Closes: 27858@sibi --- modules/bnporc/enterprise/pages.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/bnporc/enterprise/pages.py b/modules/bnporc/enterprise/pages.py index b01ac8cce9..a02aca40f0 100644 --- a/modules/bnporc/enterprise/pages.py +++ b/modules/bnporc/enterprise/pages.py @@ -342,6 +342,9 @@ class MarketPage(LoggedPage, HTMLPage): @method class iter_market_accounts(TableElement): + def condition(self): + return not self.el.xpath('//table[@id="table-portefeuille"]//tr/td[contains(text(), "Aucun portefeuille à afficher")]') + item_xpath = '//table[@id="table-portefeuille"]/tbody[@class="main-content"]/tr' head_xpath = '//table[@id="table-portefeuille"]/thead/tr/th/label' -- GitLab