lib/page-object/elements/element.rb in page-object-0.1 vs lib/page-object/elements/element.rb in page-object-0.1.1
- old
+ new
@@ -29,14 +29,10 @@
all_identities[ident.keys.first] = ident.values.first
end
all_identities
end
- def self.should_build_watir_xpath identifier
- ['table', 'span', 'div', 'td', 'li', 'ul', 'ol'].include? identifier[:tag_name] and identifier[:name]
- end
-
# @private
def self.selenium_identifier_for identifier
if identifier.length == 1
identifier = identifier_for identifier, selenium_finders, selenium_mapping
return identifier.keys.first, identifier.values.first
@@ -47,9 +43,13 @@
end
end
protected
+ def self.should_build_watir_xpath identifier
+ ['table', 'span', 'div', 'td', 'li', 'ul', 'ol'].include? identifier[:tag_name] and identifier[:name]
+ end
+
def self.build_xpath_for identifier
tag_locator = identifier.delete(:tag_name)
idx = identifier.delete(:index)
identifier.delete(:tag_name)
xpath = ".//#{tag_locator}"