Commit 24c31dbc authored by Quentin Defenouillere's avatar Quentin Defenouillere Committed by Romain Bignon

[spirica] Handle BrowserUnavailebl() at Login

Sometimes the server returns an error message at login, we must catch it
otherwise we return a fake wrongpass.
parent 2eb9f572
......@@ -44,6 +44,11 @@ class MaintenancePage(HTMLPage):
class LoginPage(HTMLPage):
def on_load(self):
error_msg = CleanText('//li[@class="globalErreurMessage"]')(self.doc)
if error_msg:
raise BrowserUnavailable(error_msg)
def login(self, login, password):
form = self.get_form('//form[@id="loginForm"]')
form['loginForm:name'] = login
......
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