Fixed formatting issues

This commit is contained in:
Viral Mehta 2018-03-17 18:17:48 +05:30
parent 65744c2199
commit ff5f717f7a
1 changed files with 8 additions and 6 deletions

View File

@ -168,15 +168,17 @@ def _get_clickable(clickdata, form):
if the latter is given. If not, it returns the first
clickable element found
"""
print("form =", form.__dict__)
clickables = [
el for el in form.xpath(
'descendant::*[(self::input or self::button)'
' and re:test(@type, "^submit$", "i")]'
'|descendant::*[(self::input or self::button)'
' and re:test(@type, "^image$", "i")]'
'|descendant::button[not(@type)]',
namespaces={"re": "http://exslt.org/regular-expressions"})
'descendant::*[(self::input or self::button)'
' and re:test(@type, "^submit$", "i")]'
'|descendant::*[(self::input or self::button)'
' and re:test(@type, "^image$", "i")]'
'|descendant::button[not(@type)]',
namespaces={"re": "http://exslt.org/regular-expressions"})
]
print("clickables =", clickables)
if not clickables:
return