Commit 3bd9b818 authored by Sylvie Ye's avatar Sylvie Ye Committed by Romain Bignon

[fortuneo] handle transfer label error

error message is like: "Votre saisie contient le caractère ! qui n'est pas autorisé."
parent 91c31b68
......@@ -189,10 +189,16 @@ class RegisterTransferPage(LoggedPage, HTMLPage):
class ValidateTransferPage(LoggedPage, HTMLPage):
def on_load(self):
if self.doc.xpath('//form[@id="SaisieVirementForm"]/p[has-class("error")]'):
raise TransferBankError(CleanText(
errors_msg = (
CleanText('//div[@id="error" and @class="erreur_texte"]/p[contains(text(), "n\'est pas autorisé")]')(self.doc),
for error in errors_msg:
if error:
raise TransferBankError(error)
other_error_msg = self.doc.xpath('//div[@id="error" and @class="erreur_texte"]')
assert not other_error_msg, 'Error "other_error_msg" is not handled yet'
def check_transfer_data(self, transfer_data):
for t_data in transfer_data:
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