Skip to content
Browse files

Apply disabled to all methods of locating fields

  • Loading branch information...
1 parent a8f970d commit ee35f7b383f590680b55a191f89a31e9ae06c615 @jnicklas committed
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

0 comments on commit ee35f7b

Please sign in to comment.
Something went wrong with that request. Please try again.