Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Apply disabled to all methods of locating fields

  • Loading branch information...
commit ee35f7b383f590680b55a191f89a31e9ae06c615 1 parent a8f970d
@jnicklas authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  lib/xpath/html.rb
View
3  lib/xpath/html.rb
@@ -167,8 +167,9 @@ def definition_description(locator)
protected
def locate_field(xpath, locator)
- locate_field = xpath[~attr(:disabled)][attr(:id).equals(locator) | attr(:name).equals(locator) | attr(:placeholder).equals(locator) | attr(:id).equals(anywhere(:label)[string.n.contains(locator)].attr(:for))]
+ locate_field = xpath[attr(:id).equals(locator) | attr(:name).equals(locator) | attr(:placeholder).equals(locator) | attr(:id).equals(anywhere(:label)[string.n.contains(locator)].attr(:for))]
locate_field += descendant(:label)[string.n.contains(locator)].descendant(xpath)
+ locate_field[~attr(:disabled)]
end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.