Method: PageObject::ElementLocators#button_element

Defined in:
lib/page-object/element_locators.rb

#button_element(identifier) ⇒ Object

Finds a button

Parameters:

  • 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

    • :id => Watir and Selenium

    • :index => Watir and Selenium

    • :name => Watir and Selenium

    • :text => Watir only

    • :value => Watir and Selenium

    • :xpath => Watir and Selenium

    • :src => Watir and Selenium (image button only)

    • :alt => Watir and Selenium (image button only)



19
20
21
# File 'lib/page-object/element_locators.rb', line 19

def button_element(identifier)
  platform.button_for(identifier.clone)
end