From cc47053ebd92159f6688314002bc227e5bc897d2 Mon Sep 17 00:00:00 2001 From: Olivier Da Rocha Date: Thu, 15 Mar 2018 18:19:52 +0100 Subject: [PATCH] [s2e] fixes xpath for investment/pocket quantity --- modules/s2e/pages.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/s2e/pages.py b/modules/s2e/pages.py index a65a5b1584..8a803f9c68 100644 --- a/modules/s2e/pages.py +++ b/modules/s2e/pages.py @@ -425,7 +425,7 @@ def obj_portfolio_share(self): def update_invs_quantity(self, invs): for inv in invs: inv.quantity = MyDecimal().filter(CleanText('//div[contains(@id, "ongletDetailParSupport")] \ - //tr[.//div[contains(text(), "%s")]]/td[last()]//div/text()' % inv.label)(self.doc)) + //tr[.//div[contains(replace(text(), "\xa0", " "), "%s")]]/td[last()]//div/text()' % inv.label)(self.doc)) return invs @method @@ -465,7 +465,7 @@ def update_pockets_quantity(self, pockets): for pocket in pockets: # not so pretty pocket.quantity = MyDecimal(CleanText('//div[contains(@id, "detailParSupportEtDate")] \ - //tbody[.//div[contains(text(), "%s")]]/following-sibling::tbody[1]//tr[.//span[contains(text(), \ + //tbody[.//div[contains(replace(text(), "\xa0", " "), "%s")]]/following-sibling::tbody[1]//tr[.//span[contains(text(), \ "%s")]]/td[last()]//div/text()' % (pocket.investment.label, pocket._matching_txt)))(self.doc) return pockets -- GitLab