Method: PageObject::ElementLocators#form_element

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

#form_element(identifier = {:index => 0}) ⇒ Object

Finds a form

Parameters:

  • identifier (Hash) (defaults to: {:index => 0})

    how we find a form. You can use a multiple paramaters by combining of any of the following except xpath. It defaults to => 0 which will return the first form. The valid keys are:

    • :class => Watir and Selenium

    • :id => Watir and Selenium

    • :index => Watir and Selenium

    • :xpath => Watir and Selenium



479
480
481
# File 'lib/page-object/element_locators.rb', line 479

def form_element(identifier={:index => 0})
  platform.form_for(identifier.clone)
end