Maxime Gasselin
Committed by Romain Bignon

[creditmutuel] Raise BrowserUnavailable

Here we raise a BrowserUnavailable when this page is not correctly
reached. Indeed, this error case seems to occur randomly (a
connection push restores the connection).

Closes: 29243@sibi 29222@sibi 8399@zendesk 8398@zendesk
......@@ -1907,6 +1907,8 @@ class NewCardsListPage(LoggedPage, HTMLPage):
raise SkipItem()
elif doc.xpath('//div/p[contains(text(), "Vous n\'avez pas l\'autorisation")]'):
self.logger.warning("The user can't reach this page")
elif doc.xpath('//td[contains(text(), "Problème technique")]'):
raise BrowserUnavailable(CleanText(doc.xpath('//td[contains(text(), "Problème technique")]'))(self))
assert False, 'xpath for card type information could have changed'