Module: PageObject::ElementLocators

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

Instance Method Summary collapse

Instance Method Details

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

Finds a button

Parameters:

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

    how we find a button. You can use a multiple paramaters by combining of any of the following except xpath. It defaults to => 0 which will find the first button. 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

    • :xpath => Watir and Selenium

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

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



21
22
23
# File 'lib/page-object/element_locators.rb', line 21

def button_element(identifier={:index => 0})
  platform.button_for(identifier.clone)
end

#button_elements(identifier = {}) ⇒ Object

Finds all buttons that match the provided identifier

Parameters:

  • identifier (Hash) (defaults to: {})

    how we find a button. You can use a multiple paramaters by combining of any of the following except xpath. It defaults to an empty hash which will find all button elements. 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

    • :xpath => Watir and Selenium

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

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



42
43
44
# File 'lib/page-object/element_locators.rb', line 42

def button_elements(identifier={})
  platform.buttons_for(identifier.clone)
end

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

Finds a table cell

Parameters:

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

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

    • :class => Watir and Selenium

    • :id => Watir and Selenium

    • :index => Watir only

    • :name => Watir and Selenium

    • :text => Watir and Selenium

    • :xpath => Watir and Selenium



415
416
417
# File 'lib/page-object/element_locators.rb', line 415

def cell_element(identifier={:index => 0})
  platform.cell_for(identifier.clone)
end

#cell_elements(identifier = {}) ⇒ Object

Finds all table cell elements that match the provided identifier

Parameters:

  • identifier (Hash) (defaults to: {})

    how we find a cell. You can use a multiple paramaters by combining of any of the following except xpath. It defaults to an empty Hash which will return all table cells. The valid keys are:

    • :class => Watir and Selenium

    • :id => Watir and Selenium

    • :index => Watir only

    • :name => Watir and Selenium

    • :text => Watir and Selenium

    • :xpath => Watir and Selenium



432
433
434
# File 'lib/page-object/element_locators.rb', line 432

def cell_elements(identifier={})
  platform.cells_for(identifier.clone)
end

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

Finds a checkbox

Parameters:

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

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

    • :class => Watir and Selenium

    • :id => Watir and Selenium

    • :index => Watir and Selenium

    • :name => Watir and Selenium

    • :xpath => Watir and Selenium



252
253
254
# File 'lib/page-object/element_locators.rb', line 252

def checkbox_element(identifier={:index => 0})
  platform.checkbox_for(identifier.clone)
end

#checkbox_elements(identifier = {}) ⇒ Object

Finds all checkbox elements for the provided identifier

Parameters:

  • identifier (Hash) (defaults to: {})

    how we find a checkbox. You can use a multiple paramaters by combining of any of the following except xpath. It defaults to an empty Hash which will return all checkboxes. The valid keys are:

    • :class => Watir and Selenium

    • :id => Watir and Selenium

    • :index => Watir and Selenium

    • :name => Watir and Selenium

    • :xpath => Watir and Selenium



268
269
270
# File 'lib/page-object/element_locators.rb', line 268

def checkbox_elements(identifier={})
  platform.checkboxes_for(identifier.clone)
end

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

Finds a div

Parameters:

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

    how we find a div. You can use a multiple paramaters by combining of any of the following except xpath. It defaults to => 0 which will return the first div. 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



317
318
319
# File 'lib/page-object/element_locators.rb', line 317

def div_element(identifier={:index => 0})
  platform.div_for(identifier.clone)
end

#div_elements(identifier = {}) ⇒ Object

Finds all divs that match the provided identifier

Parameters:

  • identifier (Hash) (defaults to: {})

    how we find a div. You can use a multiple paramaters by combining of any of the following except xpath. It defaults to an empty Hash which will return all divs. 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



334
335
336
# File 'lib/page-object/element_locators.rb', line 334

def div_elements(identifier={})
  platform.divs_for(identifier.clone)
end

#element(tag, identifier = {:index => 0}) ⇒ Object

Finds an element

Parameters:

  • the (Symbol)

    name of the tag for the element

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

    how we find an element. 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

    • :xpath => Watir and Selenium



896
897
898
# File 'lib/page-object/element_locators.rb', line 896

def element(tag, identifier={:index => 0})
  platform.element_for(tag, identifier.clone)
end

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

Finds a file field

Parameters:

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

    how we find a file field. You can use a multiple paramaters by combining of any of the following except xpath. It defaults to => 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

    • :title => Watir and Selenium

    • :xpath => Watir and Selenium



864
865
866
# File 'lib/page-object/element_locators.rb', line 864

def file_field_element(identifier={:index => 0})
  platform.file_field_for(identifier.clone)
end

#file_field_elements(identifier = {}) ⇒ Object

Finds all file fields that match the provided identifier

Parameters:

  • identifier (Hash) (defaults to: {})

    how we find a file field. 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

    • :title => Watir and Selenium

    • :xpath => Watir and Selenium



880
881
882
# File 'lib/page-object/element_locators.rb', line 880

def file_field_elements(identifier={})
  platform.file_fields_for(identifier.clone)
end

#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

#form_elements(identifier = {}) ⇒ Object

Finds all forms that match the provided identifier

Parameters:

  • identifier (Hash) (defaults to: {})

    how we find a form. You can use a multiple paramaters by combining of any of the following except xpath. It defaults to an empty Hash which will return all forms. The valid keys are:

    • :class => Watir and Selenium

    • :id => Watir and Selenium

    • :index => Watir and Selenium

    • :xpath => Watir and Selenium



494
495
496
# File 'lib/page-object/element_locators.rb', line 494

def form_elements(identifier={})
  platform.forms_for(identifier.clone)
end

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

Finds a h1

Parameters:

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

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

    • :class => Watir and Selenium

    • :id => Watir and Selenium

    • :index => Watir and Selenium

    • :name => Watir and Selenium

    • :xpath => Watir and Selenium



606
607
608
# File 'lib/page-object/element_locators.rb', line 606

def h1_element(identifier={:index => 0})
  platform.h1_for(identifier.clone)
end

#h1_elements(identifier = {}) ⇒ Object

Finds all h1 elements matching the identifier

Parameters:

  • identifier (Hash) (defaults to: {})

    how we find a H1. You can use a multiple paramaters by combining of any of the following except xpath. It defaults to an empty Hash which will return all h1s. The valid keys are:

    • :class => Watir and Selenium

    • :id => Watir and Selenium

    • :index => Watir and Selenium

    • :name => Watir and Selenium

    • :xpath => Watir and Selenium



622
623
624
# File 'lib/page-object/element_locators.rb', line 622

def h1_elements(identifier={})
  platform.h1s_for(identifier.clone)
end

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

Finds a h2

Parameters:

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

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

    • :class => Watir and Selenium

    • :id => Watir and Selenium

    • :index => Watir and Selenium

    • :name => Watir and Selenium

    • :xpath => Watir and Selenium



638
639
640
# File 'lib/page-object/element_locators.rb', line 638

def h2_element(identifier={:index => 0})
  platform.h2_for(identifier.clone)
end

#h2_elements(identifier = {}) ⇒ Object

Finds all h2 elements matching the identifier

Parameters:

  • identifier (Hash) (defaults to: {})

    how we find a H2. You can use a multiple paramaters by combining of any of the following except xpath. It defaults to an empty Hash which will return all h2s. The valid keys are:

    • :class => Watir and Selenium

    • :id => Watir and Selenium

    • :index => Watir and Selenium

    • :name => Watir and Selenium

    • :xpath => Watir and Selenium



654
655
656
# File 'lib/page-object/element_locators.rb', line 654

def h2_elements(identifier={})
  platform.h2s_for(identifier.clone)
end

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

Finds a h3

Parameters:

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

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

    • :class => Watir and Selenium

    • :id => Watir and Selenium

    • :index => Watir and Selenium

    • :name => Watir and Selenium

    • :xpath => Watir and Selenium



670
671
672
# File 'lib/page-object/element_locators.rb', line 670

def h3_element(identifier={:index => 0})
  platform.h3_for(identifier.clone)
end

#h3_elements(identifier = {}) ⇒ Object

Finds all h3 elements for the identifier

Parameters:

  • identifier (Hash) (defaults to: {})

    how we find a H3. You can use a multiple paramaters by combining of any of the following except xpath. It defaults to an empty Hash which will return all h3s. The valid keys are:

    • :class => Watir and Selenium

    • :id => Watir and Selenium

    • :index => Watir and Selenium

    • :name => Watir and Selenium

    • :xpath => Watir and Selenium



686
687
688
# File 'lib/page-object/element_locators.rb', line 686

def h3_elements(identifier={})
  platform.h3s_for(identifier.clone)
end

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

Finds a h4

Parameters:

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

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

    • :class => Watir and Selenium

    • :id => Watir and Selenium

    • :index => Watir and Selenium

    • :name => Watir and Selenium

    • :xpath => Watir and Selenium



702
703
704
# File 'lib/page-object/element_locators.rb', line 702

def h4_element(identifier={:index => 0})
  platform.h4_for(identifier.clone)
end

#h4_elements(identifier = {}) ⇒ Object

Finds all h4 elements matching the identifier

Parameters:

  • identifier (Hash) (defaults to: {})

    how we find a H4. You can use a multiple paramaters by combining of any of the following except xpath. It defaults to an empty Hash which will select all h4s. The valid keys are:

    • :class => Watir and Selenium

    • :id => Watir and Selenium

    • :index => Watir and Selenium

    • :name => Watir and Selenium

    • :xpath => Watir and Selenium



718
719
720
# File 'lib/page-object/element_locators.rb', line 718

def h4_elements(identifier={})
  platform.h4s_for(identifier.clone)
end

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

Finds a h5

Parameters:

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

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

    • :class => Watir and Selenium

    • :id => Watir and Selenium

    • :index => Watir and Selenium

    • :name => Watir and Selenium

    • :xpath => Watir and Selenium



734
735
736
# File 'lib/page-object/element_locators.rb', line 734

def h5_element(identifier={:index => 0})
  platform.h5_for(identifier.clone)
end

#h5_elements(identifier = {}) ⇒ Object

Finds all h5 elements for the identifier

Parameters:

  • identifier (Hash) (defaults to: {})

    how we find a H5. You can use a multiple paramaters by combining of any of the following except xpath. It defaults to using an empty Hash which will return all h5 elements. The valid keys are:

    • :class => Watir and Selenium

    • :id => Watir and Selenium

    • :index => Watir and Selenium

    • :name => Watir and Selenium

    • :xpath => Watir and Selenium



750
751
752
# File 'lib/page-object/element_locators.rb', line 750

def h5_elements(identifier={})
  platform.h5s_for(identifier.clone)
end

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

Finds a h6

Parameters:

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

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

    • :class => Watir and Selenium

    • :id => Watir and Selenium

    • :index => Watir and Selenium

    • :name => Watir and Selenium

    • :xpath => Watir and Selenium



766
767
768
# File 'lib/page-object/element_locators.rb', line 766

def h6_element(identifier={:index => 0})
  platform.h6_for(identifier.clone)
end

#h6_elements(identifier = {}) ⇒ Object

Finds all h6 elements matching the identifier

Parameters:

  • identifier (Hash) (defaults to: {})

    how we find a H6. You can use a multiple paramaters by combining of any of the following except xpath. It defaults to an empty Hash which will return all h6 elements. The valid keys are:

    • :class => Watir and Selenium

    • :id => Watir and Selenium

    • :index => Watir and Selenium

    • :name => Watir and Selenium

    • :xpath => Watir and Selenium



782
783
784
# File 'lib/page-object/element_locators.rb', line 782

def h6_elements(identifier={})
  platform.h6s_for(identifier.clone)
end

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

Finds a hidden field

Parameters:

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

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

    • :class => Watir and Selenium

    • :css => Watir and Selenium

    • :id => Watir and Selenium

    • :index => Watir and Selenium

    • :name => Watir and Selenium

    • :tag_name => Watir and Selenium

    • :text => Watir and Selenium

    • :xpath => Watir and Selenium



103
104
105
# File 'lib/page-object/element_locators.rb', line 103

def hidden_field_element(identifier={:index => 0})
  platform.hidden_field_for(identifier.clone)
end

#hidden_field_elements(identifier = {}) ⇒ Object

Finds all hidden fields that match the identifier

Parameters:

  • identifier (Hash) (defaults to: {})

    how we find a hidden field. You can use a multiple paramaters by combining of any of the following except xpath. It defaults to an empty hash which will return all hidden fields. The valid keys are:

    • :class => Watir and Selenium

    • :css => Watir and Selenium

    • :id => Watir and Selenium

    • :index => Watir and Selenium

    • :name => Watir and Selenium

    • :tag_name => Watir and Selenium

    • :text => Watir and Selenium

    • :xpath => Watir and Selenium



122
123
124
# File 'lib/page-object/element_locators.rb', line 122

def hidden_field_elements(identifier={})
  platform.hidden_fields_for(identifier.clone)
end

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

Finds an image

Parameters:

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

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

    • :class => Watir and Selenium

    • :id => Watir and Selenium

    • :index => Watir and Selenium

    • :name => Watir and Selenium

    • :xpath => Watir and Selenium



448
449
450
# File 'lib/page-object/element_locators.rb', line 448

def image_element(identifier={:index => 0})
  platform.image_for(identifier.clone)
end

#image_elements(identifier = {}) ⇒ Object

Finds all images that match the provided identifier

Parameters:

  • identifier (Hash) (defaults to: {})

    how we find an image. You can use a multiple paramaters by combining of any of the following except xpath. It defaults to an empth Hash which will return all images. The valid keys are:

    • :class => Watir and Selenium

    • :id => Watir and Selenium

    • :index => Watir and Selenium

    • :name => Watir and Selenium

    • :xpath => Watir and Selenium



464
465
466
# File 'lib/page-object/element_locators.rb', line 464

def image_elements(identifier={})
  platform.images_for(identifier.clone)
end

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

Finds a label

Parameters:

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

    how we find a label. You can use a multiple paramaters by combining of any of the following except xpath. It defaults to => 0 whcih will return the first label. 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



831
832
833
# File 'lib/page-object/element_locators.rb', line 831

def label_element(identifier={:index => 0})
  platform.label_for(identifier.clone)
end

#label_elements(identifier = {}) ⇒ Object

Finds all labels that match the provided identifier

Parameters:

  • identifier (Hash) (defaults to: {})

    how we find a label. You can use a multiple paramaters by combining of any of the following except xpath. It defaults to an empty hash which returns all labels. 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



848
849
850
# File 'lib/page-object/element_locators.rb', line 848

def label_elements(identifier={})
  platform.labels_for(identifier.clone)
end

Finds a link

Parameters:

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

    how we find a link. You can use a multiple paramaters by combining of any of the following except xpath. It defaults to => 0 which will select the first link. 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

    • :name => Watir and Selenium

    • :text => Watir and Selenium

    • :xpath => Watir and Selenium



215
216
217
# File 'lib/page-object/element_locators.rb', line 215

def link_element(identifier={:index => 0})
  platform.link_for(identifier.clone)
end

Find all links for the provided identifier

Parameters:

  • identifier (Hash) (defaults to: {})

    how we find a link. You can use a multiple paramaters by combining of any of the following except xpath. It defaults to an empty Hash which will return all links. 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

    • :name => Watir and Selenium

    • :text => Watir and Selenium

    • :xpath => Watir and Selenium



236
237
238
# File 'lib/page-object/element_locators.rb', line 236

def link_elements(identifier={})
  platform.links_for(identifier.clone)
end

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

Finds a list item

Parameters:

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

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

    • :class => Watir and Selenium

    • :id => Watir and Selenium

    • :index => Watir and Selenium

    • :name => Watir and Selenium

    • :xpath => Watir and Selenium



510
511
512
# File 'lib/page-object/element_locators.rb', line 510

def list_item_element(identifier={:index => 0})
  platform.list_item_for(identifier.clone)
end

#list_item_elements(identifier = {}) ⇒ Object

Finds all list items that match the identifier

Parameters:

  • identifier (Hash) (defaults to: {})

    how we find a list item. You can use a multiple paramaters by combining of any of the following except xpath. It defaults to an empty Hash which will return all list items. The valid keys are:

    • :class => Watir and Selenium

    • :id => Watir and Selenium

    • :index => Watir and Selenium

    • :name => Watir and Selenium

    • :xpath => Watir and Selenium



526
527
528
# File 'lib/page-object/element_locators.rb', line 526

def list_item_elements(identifier={})
  platform.list_items_for(identifier.clone)
end

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

Finds an ordered list

Parameters:

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

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

    • :class => Watir and Selenium

    • :id => Watir and Selenium

    • :index => Watir and Selenium

    • :name => Watir and Selenium

    • :xpath => Watir and Selenium



574
575
576
# File 'lib/page-object/element_locators.rb', line 574

def ordered_list_element(identifier={:index => 0})
  platform.ordered_list_for(identifier.clone)
end

#ordered_list_elements(identifier = {}) ⇒ Object

Finds all ordered lists that match the identifier

Parameters:

  • identifier (Hash) (defaults to: {})

    how we find an ordered list. You can use a multiple paramaters by combining of any of the following except xpath. It defaults to an empty Hash which returns all ordered lists. The valid keys are:

    • :class => Watir and Selenium

    • :id => Watir and Selenium

    • :index => Watir and Selenium

    • :name => Watir and Selenium

    • :xpath => Watir and Selenium



590
591
592
# File 'lib/page-object/element_locators.rb', line 590

def ordered_list_elements(identifier={})
  platform.ordered_lists_for(identifier.clone)
end

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

Finds a paragraph

Parameters:

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

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

    • :class => Watir and Selenium

    • :id => Watir and Selenium

    • :index => Watir and Selenium

    • :name => Watir and Selenium

    • :xpath => Watir and Selenium



798
799
800
# File 'lib/page-object/element_locators.rb', line 798

def paragraph_element(identifier={:index => 0})
  platform.paragraph_for(identifier.clone)
end

#paragraph_elements(identifier = {}) ⇒ Object

Finds all paragraph elements

Parameters:

  • identifier (Hash) (defaults to: {})

    how we find a paragraph. You can use a multiple paramaters by combining of any of the following except xpath. It defaults to an empty Hash which will return all paragraphs. The valid keys are:

    • :class => Watir and Selenium

    • :id => Watir and Selenium

    • :index => Watir and Selenium

    • :name => Watir and Selenium

    • :xpath => Watir and Selenium



814
815
816
# File 'lib/page-object/element_locators.rb', line 814

def paragraph_elements(identifier={})
  platform.paragraphs_for(identifier.clone)
end

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

Finds a radio button

Parameters:

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

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

    • :class => Watir and Selenium

    • :id => Watir and Selenium

    • :index => Watir and Selenium

    • :name => Watir and Selenium

    • :xpath => Watir and Selenium



284
285
286
# File 'lib/page-object/element_locators.rb', line 284

def radio_button_element(identifier={:index => 0})
  platform.radio_button_for(identifier.clone)
end

#radio_button_elements(identifier = {}) ⇒ Object

Finds all radio button elements that match the provided identifier

Parameters:

  • identifier (Hash) (defaults to: {})

    how we find a radio button. You can use a multiple paramaters by combining of any of the following except xpath. It defaults to an empty Hash which will return all radio buttons. The valid keys are:

    • :class => Watir and Selenium

    • :id => Watir and Selenium

    • :index => Watir and Selenium

    • :name => Watir and Selenium

    • :xpath => Watir and Selenium



300
301
302
# File 'lib/page-object/element_locators.rb', line 300

def radio_button_elements(identifier={})
  platform.radio_buttons_for(identifier.clone)
end

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

Finds a select list

Parameters:

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

    how we find a select list. You can use a multiple paramaters by combining of any of the following except xpath. It defaults to => 0 which will select the first select list. 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 only

    • :xpath => Watir and Selenium



176
177
178
# File 'lib/page-object/element_locators.rb', line 176

def select_list_element(identifier={:index => 0})
  platform.select_list_for(identifier.clone)
end

#select_list_elements(identifier = {}) ⇒ Object

Finds all select lists for the provided identifier

Parameters:

  • identifier (Hash) (defaults to: {})

    how we find a select list. You can use a multiple paramaters by combining of any of the following except xpath. It defaults to an empty Hash which will return all select lists. 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 only

    • :xpath => Watir and Selenium



194
195
196
# File 'lib/page-object/element_locators.rb', line 194

def select_list_elements(identifier={})
  platform.select_lists_for(identifier.clone)
end

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

Finds a span

Parameters:

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

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

    • :class => Watir and Selenium

    • :id => Watir and Selenium

    • :index => Watir and Selenium

    • :name => Watir and Selenium

    • :xpath => Watir and Selenium



350
351
352
# File 'lib/page-object/element_locators.rb', line 350

def span_element(identifier={:index => 0})
  platform.span_for(identifier.clone)
end

#span_elements(identifier = {}) ⇒ Object

Finds all span elements that match the provided identifier

Parameters:

  • identifier (Hash) (defaults to: {})

    how we find a span. You can use a multiple paramaters by combining of any of the following except xpath. It defaults to an empty Hash which will return all of the spans. The valid keys are:

    • :class => Watir and Selenium

    • :id => Watir and Selenium

    • :index => Watir and Selenium

    • :name => Watir and Selenium

    • :xpath => Watir and Selenium



366
367
368
# File 'lib/page-object/element_locators.rb', line 366

def span_elements(identifier={})
  platform.spans_for(identifier.clone)
end

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

Finds a table

Parameters:

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

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

    • :class => Watir and Selenium

    • :id => Watir and Selenium

    • :index => Watir and Selenium

    • :name => Watir and Selenium

    • :xpath => Watir and Selenium



382
383
384
# File 'lib/page-object/element_locators.rb', line 382

def table_element(identifier={:index => 0})
  platform.table_for(identifier.clone)
end

#table_elements(identifier = {}) ⇒ Object

Finds all tables that match the provided identifier

Parameters:

  • identifier (Hash) (defaults to: {})

    how we find a table. You can use a multiple paramaters by combining of any of the following except xpath. It defaults to an empty Hash which will return all tables. The valid keys are:

    • :class => Watir and Selenium

    • :id => Watir and Selenium

    • :index => Watir and Selenium

    • :name => Watir and Selenium

    • :xpath => Watir and Selenium



398
399
400
# File 'lib/page-object/element_locators.rb', line 398

def table_elements(identifier={})
  platform.tables_for(identifier.clone)
end

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

Finds a text area

Parameters:

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

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

    • :class => Watir and Selenium

    • :css => Watir and Selenium

    • :id => Watir and Selenium

    • :index => Watir and Selenium

    • :name => Watir and Selenium

    • :tag_name => Watir and Selenium

    • :xpath => Watir and Selenium



140
141
142
# File 'lib/page-object/element_locators.rb', line 140

def text_area_element(identifier={:index => 0})
  platform.text_area_for(identifier.clone)
end

#text_area_elements(identifier = {}) ⇒ Object

Finds all text areas for the provided identifier

Parameters:

  • identifier (Hash) (defaults to: {})

    how we find a text area. You can use a multiple paramaters by combining of any of the following except xpath. It defaults to an empty hash which will return all text areas. The valid keys are:

    • :class => Watir and Selenium

    • :css => Watir and Selenium

    • :id => Watir and Selenium

    • :index => Watir and Selenium

    • :name => Watir and Selenium

    • :tag_name => Watir and Selenium

    • :xpath => Watir and Selenium



158
159
160
# File 'lib/page-object/element_locators.rb', line 158

def text_area_elements(identifier={})
  platform.text_areas_for(identifier.clone)
end

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

Finds a text field

Parameters:

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

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

    • :class => Watir and Selenium

    • :css => Watir and Selenium

    • :id => Watir and Selenium

    • :index => Watir and Selenium

    • :name => Watir and Selenium

    • :tag_name => Watir and Selenium

    • :text => Watir only

    • :title => Watir and Selenium

    • :value => Watir only

    • :xpath => Watir and Selenium



63
64
65
# File 'lib/page-object/element_locators.rb', line 63

def text_field_element(identifier={:index => 0})
  platform.text_field_for(identifier.clone)
end

#text_field_elements(identifier = {}) ⇒ Object

Finds all text fields that match the provided identifier

Parameters:

  • identifier (Hash) (defaults to: {})

    how we find a text field. You can use a multiple paramaters by combining of any of the following except xpath. It defaults to an empty Hash which will find all text field elements. The valid keys are:

    • :class => Watir and Selenium

    • :css => Watir and Selenium

    • :id => Watir and Selenium

    • :index => Watir and Selenium

    • :name => Watir and Selenium

    • :tag_name => Watir and Selenium

    • :text => Watir only

    • :title => Watir and Selenium

    • :value => Watir only

    • :xpath => Watir and Selenium



84
85
86
# File 'lib/page-object/element_locators.rb', line 84

def text_field_elements(identifier={})
  platform.text_fields_for(identifier.clone)
end

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

Finds an unordered list

Parameters:

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

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

    • :class => Watir and Selenium

    • :id => Watir and Selenium

    • :index => Watir and Selenium

    • :name => Watir and Selenium

    • :xpath => Watir and Selenium



542
543
544
# File 'lib/page-object/element_locators.rb', line 542

def unordered_list_element(identifier={:index => 0})
  platform.unordered_list_for(identifier.clone)
end

#unordered_list_elements(identifier = {}) ⇒ Object

Finds all unordered lists that match the identifier

Parameters:

  • identifier (Hash) (defaults to: {})

    how we find an unordered list. You can use a multiple paramaters by combining of any of the following except xpath. It defaults to an empty Hash which will return all unordered lists. The valid keys are:

    • :class => Watir and Selenium

    • :id => Watir and Selenium

    • :index => Watir and Selenium

    • :name => Watir and Selenium

    • :xpath => Watir and Selenium



558
559
560
# File 'lib/page-object/element_locators.rb', line 558

def unordered_list_elements(identifier={})
  platform.unordered_lists_for(identifier.clone)
end