fix detecting wrong pass
This commit is contained in:
parent
e5cf3be147
commit
5699a18cf0
1 changed files with 6 additions and 2 deletions
|
|
@ -42,11 +42,15 @@ class LoginResultPage(BasePage):
|
|||
self.browser.location('MainAuth?typeDemande=AC', no_login=True)
|
||||
|
||||
def get_error(self):
|
||||
error = self.document.xpath('//td[@class="txt_norm2"]/b')
|
||||
error = self.document.xpath('//td[@class="txt_norm2"]')
|
||||
if len(error) == 0:
|
||||
return None
|
||||
|
||||
return error[0].text.strip()
|
||||
error = error[0]
|
||||
if error.find('b') is not None:
|
||||
error = error.find('b')
|
||||
|
||||
return error.text.strip()
|
||||
|
||||
class EmptyPage(BasePage):
|
||||
pass
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue