Module: PageObject::ElementLocators

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

Instance Method Summary collapse

Instance Method Details

#button_element(identifier) ⇒ Object

Finds a button

Parameters:

  • identifier (Hash)

    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

#button_elements(identifier) ⇒ Object

Finds all buttons that match the provided identifier

Parameters:

  • identifier (Hash)

    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)



38
39
40
# File 'lib/page-object/element_locators.rb', line 38

def button_elements(identifier)
  platform.buttons_for(identifier.clone)
end

#cell_element(identifier) ⇒ Object

Finds a table cell

Parameters:

  • identifier (Hash)

    how we find a cell. 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 only

    • :name => Watir and Selenium

    • :text => Watir and Selenium

    • :xpath => Watir and Selenium



388
389
390
# File 'lib/page-object/element_locators.rb', line 388

def cell_element(identifier)
  platform.cell_for(identifier.clone)
end

#cell_elements(identifier) ⇒ Object

Finds all table cell elements that match the provided identifier

Parameters:

  • identifier (Hash)

    how we find a cell. 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 only

    • :name => Watir and Selenium

    • :text => Watir and Selenium

    • :xpath => Watir and Selenium



404
405
406
# File 'lib/page-object/element_locators.rb', line 404

def cell_elements(identifier)
  platform.cells_for(identifier.clone)
end

#checkbox_element(identifier) ⇒ Object

Finds a checkbox

Parameters:

  • identifier (Hash)

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



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

def checkbox_element(identifier)
  platform.checkbox_for(identifier.clone)
end

#checkbox_elements(identifier) ⇒ Object

Finds all checkbox elements for the provided identifier

Parameters:

  • identifier (Hash)

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



250
251
252
# File 'lib/page-object/element_locators.rb', line 250

def checkbox_elements(identifier)
  platform.checkboxes_for(identifier.clone)
end

#div_element(identifier) ⇒ Object

Finds a div

Parameters:

  • identifier (Hash)

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



296
297
298
# File 'lib/page-object/element_locators.rb', line 296

def div_element(identifier)
  platform.div_for(identifier.clone)
end

#div_elements(identifier) ⇒ Object

Finds all divs that match the provided identifier

Parameters:

  • identifier (Hash)

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



312
313
314
# File 'lib/page-object/element_locators.rb', line 312

def div_elements(identifier)
  platform.divs_for(identifier.clone)
end

#file_field_element(identifier) ⇒ Object

Finds a paragraph

Parameters:

  • identifier (Hash)

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

    • :title => Watir and Selenium

    • :xpath => Watir and Selenium



777
778
779
# File 'lib/page-object/element_locators.rb', line 777

def file_field_element(identifier)
  platform.file_field_for(identifier.clone)
end

#form_element(identifier) ⇒ Object

Finds a form

Parameters:

  • identifier (Hash)

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

    • :xpath => Watir and Selenium



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

def form_element(identifier)
  platform.form_for(identifier.clone)
end

#form_elements(identifier) ⇒ Object

Finds all forms that match the provided identifier

Parameters:

  • identifier (Hash)

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

    • :xpath => Watir and Selenium



462
463
464
# File 'lib/page-object/element_locators.rb', line 462

def form_elements(identifier)
  platform.forms_for(identifier.clone)
end

#h1_element(identifier) ⇒ Object

Finds a h1

Parameters:

  • identifier (Hash)

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



567
568
569
# File 'lib/page-object/element_locators.rb', line 567

def h1_element(identifier)
  platform.h1_for(identifier.clone)
end

#h1_elements(identifier) ⇒ Object

Finds all h1 elements matching the identifier

Parameters:

  • identifier (Hash)

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



582
583
584
# File 'lib/page-object/element_locators.rb', line 582

def h1_elements(identifier)
  platform.h1s_for(identifier.clone)
end

#h2_element(identifier) ⇒ Object

Finds a h2

Parameters:

  • identifier (Hash)

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



597
598
599
# File 'lib/page-object/element_locators.rb', line 597

def h2_element(identifier)
  platform.h2_for(identifier.clone)
end

#h2_elements(identifier) ⇒ Object

Finds all h2 elements matching the identifier

Parameters:

  • identifier (Hash)

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



612
613
614
# File 'lib/page-object/element_locators.rb', line 612

def h2_elements(identifier)
  platform.h2s_for(identifier.clone)
end

#h3_element(identifier) ⇒ Object

Finds a h3

Parameters:

  • identifier (Hash)

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



627
628
629
# File 'lib/page-object/element_locators.rb', line 627

def h3_element(identifier)
  platform.h3_for(identifier.clone)
end

#h3_elements(identifier) ⇒ Object

Finds all h3 elements for the identifier

Parameters:

  • identifier (Hash)

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



642
643
644
# File 'lib/page-object/element_locators.rb', line 642

def h3_elements(identifier)
  platform.h3s_for(identifier.clone)
end

#h4_element(identifier) ⇒ Object

Finds a h4

Parameters:

  • identifier (Hash)

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



657
658
659
# File 'lib/page-object/element_locators.rb', line 657

def h4_element(identifier)
  platform.h4_for(identifier.clone)
end

#h4_elements(identifier) ⇒ Object

Finds all h4 elements matching the identifier

Parameters:

  • identifier (Hash)

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



672
673
674
# File 'lib/page-object/element_locators.rb', line 672

def h4_elements(identifier)
  platform.h4s_for(identifier.clone)
end

#h5_element(identifier) ⇒ Object

Finds a h5

Parameters:

  • identifier (Hash)

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



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

def h5_element(identifier)
  platform.h5_for(identifier.clone)
end

#h5_elements(identifier) ⇒ Object

Finds all h5 elements for the identifier

Parameters:

  • identifier (Hash)

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



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

def h5_elements(identifier)
  platform.h5s_for(identifier.clone)
end

#h6_element(identifier) ⇒ Object

Finds a h6

Parameters:

  • identifier (Hash)

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



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

def h6_element(identifier)
  platform.h6_for(identifier.clone)
end

#h6_elements(identifier) ⇒ Object

Finds all h6 elements matching the identifier

Parameters:

  • identifier (Hash)

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



732
733
734
# File 'lib/page-object/element_locators.rb', line 732

def h6_elements(identifier)
  platform.h6s_for(identifier.clone)
end

#hidden_field_element(identifier) ⇒ Object

Finds a hidden field

Parameters:

  • identifier (Hash)

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

    • :tag_name => Watir and Selenium

    • :text => Watir and Selenium

    • :xpath => Watir and Selenium



96
97
98
# File 'lib/page-object/element_locators.rb', line 96

def hidden_field_element(identifier)
  platform.hidden_field_for(identifier.clone)
end

#hidden_field_elements(identifier) ⇒ Object

Finds all hidden fields that match the identifier

Parameters:

  • identifier (Hash)

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

    • :tag_name => Watir and Selenium

    • :text => Watir and Selenium

    • :xpath => Watir and Selenium



114
115
116
# File 'lib/page-object/element_locators.rb', line 114

def hidden_field_elements(identifier)
  platform.hidden_fields_for(identifier.clone)
end

#image_element(identifier) ⇒ Object

Finds an image

Parameters:

  • identifier (Hash)

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



419
420
421
# File 'lib/page-object/element_locators.rb', line 419

def image_element(identifier)
  platform.image_for(identifier.clone)
end

#image_elements(identifier) ⇒ Object

Finds all images that match the provided identifier

Parameters:

  • identifier (Hash)

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



434
435
436
# File 'lib/page-object/element_locators.rb', line 434

def image_elements(identifier)
  platform.images_for(identifier.clone)
end

Finds a link

Parameters:

  • identifier (Hash)

    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

    • :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



201
202
203
# File 'lib/page-object/element_locators.rb', line 201

def link_element(identifier)
  platform.link_for(identifier.clone)
end

Find all links for the provided identifier

Parameters:

  • identifier (Hash)

    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

    • :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



220
221
222
# File 'lib/page-object/element_locators.rb', line 220

def link_elements(identifier)
  platform.links_for(identifier.clone)
end

#list_item_element(identifier) ⇒ Object

Finds a list item

Parameters:

  • identifier (Hash)

    how we find a list item. 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



477
478
479
# File 'lib/page-object/element_locators.rb', line 477

def list_item_element(identifier)
  platform.list_item_for(identifier.clone)
end

#list_item_elements(identifier) ⇒ Object

Finds all list items that match the identifier

Parameters:

  • identifier (Hash)

    how we find a list item. 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



492
493
494
# File 'lib/page-object/element_locators.rb', line 492

def list_item_elements(identifier)
  platform.list_items_for(identifier.clone)
end

#ordered_list_element(identifier) ⇒ Object

Finds an ordered list

Parameters:

  • identifier (Hash)

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



537
538
539
# File 'lib/page-object/element_locators.rb', line 537

def ordered_list_element(identifier)
  platform.ordered_list_for(identifier.clone)
end

#ordered_list_elements(identifier) ⇒ Object

Finds all ordered lists that match the identifier

Parameters:

  • identifier (Hash)

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



552
553
554
# File 'lib/page-object/element_locators.rb', line 552

def ordered_list_elements(identifier)
  platform.ordered_lists_for(identifier.clone)
end

#paragraph_element(identifier) ⇒ Object

Finds a paragraph

Parameters:

  • identifier (Hash)

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



747
748
749
# File 'lib/page-object/element_locators.rb', line 747

def paragraph_element(identifier)
  platform.paragraph_for(identifier.clone)
end

#paragraph_elements(identifier) ⇒ Object

Finds all paragraph elements

Parameters:

  • identifier (Hash)

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



762
763
764
# File 'lib/page-object/element_locators.rb', line 762

def paragraph_elements(identifier)
  platform.paragraphs_for(identifier.clone)
end

#radio_button_element(identifier) ⇒ Object

Finds a radio button

Parameters:

  • identifier (Hash)

    how we find a radio 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

    • :xpath => Watir and Selenium



265
266
267
# File 'lib/page-object/element_locators.rb', line 265

def radio_button_element(identifier)
  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)

    how we find a radio 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

    • :xpath => Watir and Selenium



280
281
282
# File 'lib/page-object/element_locators.rb', line 280

def radio_button_elements(identifier)
  platform.radio_buttons_for(identifier.clone)
end

#select_list_element(identifier) ⇒ Object

Finds a select list

Parameters:

  • identifier (Hash)

    how we find a select list. 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 only

    • :xpath => Watir and Selenium



165
166
167
# File 'lib/page-object/element_locators.rb', line 165

def select_list_element(identifier)
  platform.select_list_for(identifier.clone)
end

#select_list_elements(identifier) ⇒ Object

Finds all select lists for the provided identifier

Parameters:

  • identifier (Hash)

    how we find a select list. 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 only

    • :xpath => Watir and Selenium



182
183
184
# File 'lib/page-object/element_locators.rb', line 182

def select_list_elements(identifier)
  platform.select_lists_for(identifier.clone)
end

#span_element(identifier) ⇒ Object

Finds a span

Parameters:

  • identifier (Hash)

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



327
328
329
# File 'lib/page-object/element_locators.rb', line 327

def span_element(identifier)
  platform.span_for(identifier.clone)
end

#span_elements(identifier) ⇒ Object

Finds all span elements that match the provided identifier

Parameters:

  • identifier (Hash)

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



342
343
344
# File 'lib/page-object/element_locators.rb', line 342

def span_elements(identifier)
  platform.spans_for(identifier.clone)
end

#table_element(identifier) ⇒ Object

Finds a table

Parameters:

  • identifier (Hash)

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



357
358
359
# File 'lib/page-object/element_locators.rb', line 357

def table_element(identifier)
  platform.table_for(identifier.clone)
end

#table_elements(identifier) ⇒ Object

Finds all tables that match the provided identifier

Parameters:

  • identifier (Hash)

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



372
373
374
# File 'lib/page-object/element_locators.rb', line 372

def table_elements(identifier)
  platform.tables_for(identifier.clone)
end

#text_area_element(identifier) ⇒ Object

Finds a text area

Parameters:

  • identifier (Hash)

    how we find a text area. 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

    • :tag_name => Watir and Selenium

    • :xpath => Watir and Selenium



131
132
133
# File 'lib/page-object/element_locators.rb', line 131

def text_area_element(identifier)
  platform.text_area_for(identifier.clone)
end

#text_area_elements(identifier) ⇒ Object

Finds all text areas for the provided identifier

Parameters:

  • identifier (Hash)

    how we find a text area. 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

    • :tag_name => Watir and Selenium

    • :xpath => Watir and Selenium



148
149
150
# File 'lib/page-object/element_locators.rb', line 148

def text_area_elements(identifier)
  platform.text_areas_for(identifier.clone)
end

#text_field_element(identifier) ⇒ Object

Finds a text field

Parameters:

  • identifier (Hash)

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

    • :tag_name => Watir and Selenium

    • :text => Watir only

    • :title => Watir and Selenium

    • :value => Watir only

    • :xpath => Watir and Selenium



58
59
60
# File 'lib/page-object/element_locators.rb', line 58

def text_field_element(identifier)
  platform.text_field_for(identifier.clone)
end

#text_field_elements(identifier) ⇒ Object

Finds all text fields that match the provided identifier

Parameters:

  • identifier (Hash)

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

    • :tag_name => Watir and Selenium

    • :text => Watir only

    • :title => Watir and Selenium

    • :value => Watir only

    • :xpath => Watir and Selenium



78
79
80
# File 'lib/page-object/element_locators.rb', line 78

def text_field_elements(identifier)
  platform.text_fields_for(identifier.clone)
end

#unordered_list_element(identifier) ⇒ Object

Finds an unordered list

Parameters:

  • identifier (Hash)

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



507
508
509
# File 'lib/page-object/element_locators.rb', line 507

def unordered_list_element(identifier)
  platform.unordered_list_for(identifier.clone)
end

#unordered_list_elements(identifier) ⇒ Object

Finds all unordered lists that match the identifier

Parameters:

  • identifier (Hash)

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



522
523
524
# File 'lib/page-object/element_locators.rb', line 522

def unordered_list_elements(identifier)
  platform.unordered_lists_for(identifier.clone)
end