diff --git a/modules/caissedepargne/pages.py b/modules/caissedepargne/pages.py index 30996e23d3648e0b95f11f6c6fb8dfa0de57eac4..3a2d31c97f67c043951937aa01cfb1fc89bd9f5b 100644 --- a/modules/caissedepargne/pages.py +++ b/modules/caissedepargne/pages.py @@ -559,7 +559,13 @@ def go_list(self): self.submit_form(form, eventargument, eventtarget, scriptmanager) def go_cards(self): + # Do not try to go the card summary if we have no card, it breaks the session + if not CleanText('//form[@id="main"]//a/span[text()="Mes cartes bancaires"]')(self.doc): + self.logger.info("Do not try to go the CardsPage, there is not link on the main page") + return + form = self.get_form(id='main') + eventargument = "" if "MM$m_CH$IsMsgInit" in form: