From cf6c421264d4dc38a6d2405cc7d7accd34dc9036 Mon Sep 17 00:00:00 2001 From: Florent Date: Wed, 25 Sep 2013 12:33:26 +0200 Subject: [PATCH] Fix detection of captcha --- modules/poivy/pages.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/poivy/pages.py b/modules/poivy/pages.py index 208d4241..39852c29 100644 --- a/modules/poivy/pages.py +++ b/modules/poivy/pages.py @@ -44,8 +44,8 @@ class LoginPage(BasePage): return False def login(self, login, password): - captcha = self.document.xpath('label[@class="label_captcha_input"]') - if captcha is not None: + captcha = self.document.xpath('//label[@class="label_captcha_input"]') + if len(captcha) > 0: return False # Form without name self.browser.select_form(predicate=self._predicate_form)