Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

renamed matcher to xpath_for

  • Loading branch information...
commit 4ce81e4da461b612661b3a50d110040e6f41f23a 1 parent 7237d7e
@despo authored
View
2  lib/prickle/capybara.rb
@@ -27,7 +27,7 @@ def element type='*', identifier
private
- def matcher identifier
+ def xpath_for identifier
return identifier.each_pair.to_a.map do |key, value|
"@#{key}='#{value}'"
end.join ' and '
View
2  lib/prickle/capybara/find.rb
@@ -21,7 +21,7 @@ def method_missing method, *args
end
def find_by_identifier_xpath element, identifier
- "//#{type_of(element)}[#{matcher(identifier)}]"
+ "//#{type_of(element)}[#{xpath_for(identifier)}]"
end
def find_element_by_identifier element, identifier
View
2  lib/prickle/capybara/match.rb
@@ -19,7 +19,7 @@ def method_missing method, *args
private
def find_by_name_and_text_xpath element, identifier, text
- "//#{type_of(element)}[#{matcher(identifier)} and contains(text(), '#{text}')]"
+ "//#{type_of(element)}[#{xpath_for(identifier)} and contains(text(), '#{text}')]"
end
def find_element_by_name_and_text element, name, text
Please sign in to comment.
Something went wrong with that request. Please try again.