lib/page-object/element_locators.rb in page-object-0.7.0 vs lib/page-object/element_locators.rb in page-object-0.7.1

- old
+ new

@@ -880,9 +880,39 @@ def file_field_elements(identifier={}) platform.file_fields_for(identifier.clone) end # + # Finds an area + # + # @param [Hash] identifier how we find an area. You can use a multiple paramaters + # by combining of any of the following except xpath. It defaults to {:index => 0} + # which will return the first file field. The valid keys are: + # * :class => Watir and Selenium + # * :id => Watir and Selenium + # * :index => Watir and Selenium + # * :name => Watir and Selenium + # * :xpath => Watir and Selenium + def area_element(identifier={:index => 0}) + platform.area_for(identifier.clone) + end + + # + # Finds all areas that match the provided identifier + # + # @param [Hash] identifier how we find an area. You can use a multiple paramaters + # by combining of any of the following except xpath. It defaults to and empty Hash + # which will return all file fields. The valid keys are: + # * :class => Watir and Selenium + # * :id => Watir and Selenium + # * :index => Watir and Selenium + # * :name => Watir and Selenium + # * :xpath => Watir and Selenium + def area_elements(identifier={}) + platform.areas_for(identifier.clone) + end + + # # Finds an element # # @param [Symbol] the name of the tag for the element # @param [Hash] identifier how we find an element. You can use a multiple paramaters # by combining of any of the following except xpath. The valid keys are: