corrected syntax error in XPath

This commit is contained in:
Viral Mehta 2018-03-19 19:28:41 +05:30
parent a5acc9373f
commit dd064413a4
1 changed files with 2 additions and 2 deletions

View File

@ -170,8 +170,8 @@ def _get_clickable(clickdata, form):
"""
clickables = [
el for el in form.xpath(
'descendant::input[re.test(@type, "^(submit|image)$", "i")]'
'|descendant::button[not(@type) or re.test(@type, "^submit$", "i")]',
'descendant::input[re:test(@type, "^(submit|image)$", "i")]'
'|descendant::button[not(@type) or re:test(@type, "^submit$", "i")]',
namespaces={"re": "http://exslt.org/regular-expressions"})
]
if not clickables: