Commit cc47053e authored by Olivier Da Rocha's avatar Olivier Da Rocha Committed by Romain Bignon

[s2e] fixes xpath for investment/pocket quantity

parent eef821e4
......@@ -425,7 +425,7 @@ class AccountsPage(LoggedPage, MultiPage):
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 @@ class AccountsPage(LoggedPage, MultiPage):
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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment