fix login on personal accounts
This commit is contained in:
parent
c038ebb024
commit
2f19e692d5
1 changed files with 9 additions and 3 deletions
|
|
@ -55,8 +55,14 @@ class LoginPage(_LogoutPage):
|
|||
self.browser.set_all_readonly(False)
|
||||
self.browser['__EVENTARGUMENT'] = 'idsrv=WE'
|
||||
|
||||
a = self.document.xpath('//a[@title="Valider"]')[0]
|
||||
m = re.match("javascript:RedirectToDeiPro\('([^']+)', \d+\);", a.attrib['href'])
|
||||
m = None
|
||||
try:
|
||||
a = self.document.xpath('//a[@title="Valider"]')[0]
|
||||
except IndexError:
|
||||
pass
|
||||
else:
|
||||
m = re.match("javascript:RedirectToDeiPro\('([^']+)', \d+\);", a.attrib['href'])
|
||||
|
||||
if m:
|
||||
self.browser['nuusager'] = nuser.encode('utf-8')
|
||||
self.browser['codconf'] = passwd.encode('utf-8')
|
||||
|
|
@ -66,7 +72,7 @@ class LoginPage(_LogoutPage):
|
|||
|
||||
return m is not None
|
||||
|
||||
def login3(self, nuser, passwd):
|
||||
def login3(self, passwd):
|
||||
self.browser.select_form(name='Main')
|
||||
self.browser['codconf'] = passwd.encode('utf-8')
|
||||
a = self.document.xpath('//a[@title="Valider"]')[0]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue