From 5236ddde0a985ec980f935f5b0d45489d1f6111d Mon Sep 17 00:00:00 2001 From: Maxime Gasselin Date: Wed, 14 Nov 2018 15:55:19 +0100 Subject: [PATCH] [caissedepargne] Fix transfer label spaces With a label with a length > 40, some spaces is add with the tag. A simple remove of wbr tag is sufficient. --- modules/caissedepargne/pages.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/caissedepargne/pages.py b/modules/caissedepargne/pages.py index ce71fd4a55..32bfbdffaf 100644 --- a/modules/caissedepargne/pages.py +++ b/modules/caissedepargne/pages.py @@ -1028,6 +1028,12 @@ def go_add_recipient(self): class TransferConfirmPage(TransferErrorPage, IndexPage): + def build_doc(self, content): + # The page have some tags in the label content (spaces added each 40 characters if the character is not a space). + # Consequently the label can't be matched with the original one. We delete these tags. + content = content.replace(b'', b'') + return super(TransferErrorPage, self).build_doc(content) + def is_here(self): return bool(CleanText(u'//h2[contains(text(), "Confirmer mon virement")]')(self.doc)) -- GitLab