Commit d8bb4f30 authored by Florian Duguet's avatar Florian Duguet Committed by Romain Bignon

[afer] return message with wrongpass

parent 084e7808
......@@ -52,7 +52,9 @@ class AferBrowser(LoginBrowser):
raise BrowserIncorrectPassword()
if self.bad_login.is_here():
raise BrowserIncorrectPassword()
error = self.page.get_error()
assert "La saisie de l’identifiant ou du code confidentiel est incorrecte" in error, error
raise BrowserIncorrectPassword(error)
@need_login
def iter_accounts(self):
......
......@@ -42,6 +42,11 @@ class LoginPage(HTMLPage):
return bool(self.doc.xpath('//form[@name="_DominoForm"]'))
class BadLogin(HTMLPage):
def get_error(self):
return CleanText('//div[@id="idDivErrorLogin"]')(self.doc)
class IndexPage(LoggedPage, HTMLPage):
def on_load(self):
HTMLPage.on_load(self)
......@@ -156,7 +161,3 @@ class AccountHistoryPage(LoggedPage, HTMLPage):
return am
return (Async('details') & CleanDecimal('//div//tr[2]/td[2]', replace_dots=True, default=NotAvailable))(
self)
class BadLogin(HTMLPage):
pass
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