Commit 9925e8cd authored by Tony Malto's avatar Tony Malto Committed by Romain Bignon

[lcl] handle case where life insurance history is not available

parent 6319464c
......@@ -267,6 +267,12 @@ class LCLBrowser(LoginBrowser, StatesMixin):
# come back to syntese
self.assurancevie.go()
return
# certain users will get a message : "Ne détenant pas de compte dépôt
# chez LCL, l'accès à ce service vous est indisponible."
if self.form2.is_here() and self.page.assurancevie_hist_not_available():
return
try:
self.page.get_details(account, "OHIPU")
except FormNotFound:
......
......@@ -725,7 +725,13 @@ class SendTokenPage(LoggedPage, LCLBasePage):
class Form2Page(LoggedPage, LCLBasePage):
def assurancevie_hist_not_available(self):
msg = "Ne détenant pas de compte dépôt chez LCL, l'accès à ce service vous est indisponible"
return msg in CleanText('//div[@id="attTxt"]')(self.doc)
def on_load(self):
if self.assurancevie_hist_not_available():
return
form = self.get_form(name="formulaire")
cName = self.get_from_js('.cName.value = "', '";')
if cName:
......
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