lib/page-object/element_locators.rb in page-object-0.6.3 vs lib/page-object/element_locators.rb in page-object-0.6.4
- old
+ new
@@ -5,10 +5,11 @@
# Finds a button
#
# @param [Hash] identifier how we find a button. You can use a multiple paramaters
# by combining of any of the following except xpath. The valid keys are:
# * :class => Watir and Selenium
+ # * :css => Watir and Selenium
# * :id => Watir and Selenium
# * :index => Watir and Selenium
# * :name => Watir and Selenium
# * :text => Watir only
# * :value => Watir and Selenium
@@ -24,10 +25,11 @@
# Finds all buttons that match the provided identifier
#
# @param [Hash] identifier how we find a button. You can use a multiple paramaters
# by combining of any of the following except xpath. The valid keys are:
# * :class => Watir and Selenium
+ # * :css => Watir and Selenium
# * :id => Watir and Selenium
# * :index => Watir and Selenium
# * :name => Watir and Selenium
# * :text => Watir only
# * :value => Watir and Selenium
@@ -187,10 +189,11 @@
# Finds a link
#
# @param [Hash] identifier how we find a link. You can use a multiple paramaters
# by combining of any of the following except xpath. The valid keys are:
# * :class => Watir and Selenium
+ # * :css => Watir and Selenium
# * :href => Watir and Selenium
# * :id => Watir and Selenium
# * :index => Watir and Selenium
# * :link => Watir and Selenium
# * :link_text => Watir and Selenium
@@ -206,10 +209,11 @@
# Find all links for the provided identifier
#
# @param [Hash] identifier how we find a link. You can use a multiple paramaters
# by combining of any of the following except xpath. The valid keys are:
# * :class => Watir and Selenium
+ # * :css => Watir and Selenium
# * :href => Watir and Selenium
# * :id => Watir and Selenium
# * :index => Watir and Selenium
# * :link => Watir and Selenium
# * :link_text => Watir and Selenium
@@ -759,9 +763,41 @@
# * :name => Watir and Selenium
# * :xpath => Watir and Selenium
#
def paragraph_elements(identifier)
platform.paragraphs_for(identifier.clone)
+ end
+
+ #
+ # Finds a label
+ #
+ # @param [Hash] identifier how we find a label. You can use a multiple paramaters
+ # by combining of any of the following except xpath. The valid keys are:
+ # * :class => Watir and Selenium
+ # * :id => Watir and Selenium
+ # * :index => Watir and Selenium
+ # * :name => Watir and Selenium
+ # * :text => Watir and Selenium
+ # * :xpath => Watir and Selenium
+ #
+ def label_element(identifier)
+ platform.label_for(identifier.clone)
+ end
+
+ #
+ # Finds all labels that match the provided identifier
+ #
+ # @param [Hash] identifier how we find a label. You can use a multiple paramaters
+ # by combining of any of the following except xpath. The valid keys are:
+ # * :class => Watir and Selenium
+ # * :id => Watir and Selenium
+ # * :index => Watir and Selenium
+ # * :name => Watir and Selenium
+ # * :text => Watir and Selenium
+ # * :xpath => Watir and Selenium
+ #
+ def label_elements(identifier)
+ platform.labels_for(identifier.clone)
end
#
# Finds a paragraph
#