Commit baedabde authored by Jerome Berthier's avatar Jerome Berthier Committed by Vincent A

[caissedepargne] fix websiteUnavailable when fetching cards

For some accounts without cards the server closes the session
when we try to reach CardsPage.
We avoid this problem by checking whether there is a link to
the cards before trying to go.
parent 19df69ab
......@@ -559,7 +559,13 @@ class IndexPage(LoggedPage, HTMLPage):
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):"Do not try to go the CardsPage, there is not link on the main page")
form = self.get_form(id='main')
eventargument = ""
if "MM$m_CH$IsMsgInit" in form:
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