fix login on new website (needs upper case login)
This commit is contained in:
parent
f23c92a1f3
commit
c80924f571
1 changed files with 2 additions and 1 deletions
|
|
@ -187,7 +187,7 @@ class Login2Page(LoginPage):
|
|||
|
||||
def login(self, login, password):
|
||||
payload = {'validate': {'PASSWORD_LOOKUP': [{'id': self.form_id,
|
||||
'login': login.encode(self.browser.ENCODING),
|
||||
'login': login.encode(self.browser.ENCODING).upper(),
|
||||
'password': password.encode(self.browser.ENCODING),
|
||||
'type': 'PASSWORD_LOOKUP'
|
||||
}]
|
||||
|
|
@ -198,6 +198,7 @@ class Login2Page(LoginPage):
|
|||
r = self.browser.openurl(req, json.dumps(payload))
|
||||
|
||||
doc = json.load(r)
|
||||
self.logger.debug(doc)
|
||||
if ('phase' in doc and doc['phase']['previousResult'] == 'FAILED_AUTHENTICATION') or \
|
||||
doc['response']['status'] != 'AUTHENTICATION_SUCCESS':
|
||||
raise BrowserIncorrectPassword()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue