Fix detection of captcha
This commit is contained in:
parent
fa214f5760
commit
cf6c421264
1 changed files with 2 additions and 2 deletions
|
|
@ -44,8 +44,8 @@ class LoginPage(BasePage):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def login(self, login, password):
|
def login(self, login, password):
|
||||||
captcha = self.document.xpath('label[@class="label_captcha_input"]')
|
captcha = self.document.xpath('//label[@class="label_captcha_input"]')
|
||||||
if captcha is not None:
|
if len(captcha) > 0:
|
||||||
return False
|
return False
|
||||||
# Form without name
|
# Form without name
|
||||||
self.browser.select_form(predicate=self._predicate_form)
|
self.browser.select_form(predicate=self._predicate_form)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue