Module: PageObject::ElementLocators
- Included in:
- PageObject
- Defined in:
- lib/page-object/element_locators.rb
Instance Method Summary collapse
-
#button_element(identifier = {:index => 0}) ⇒ Object
Finds a button.
-
#button_elements(identifier = {}) ⇒ Object
Finds all buttons that match the provided identifier.
-
#cell_element(identifier = {:index => 0}) ⇒ Object
Finds a table cell.
-
#cell_elements(identifier = {}) ⇒ Object
Finds all table cell elements that match the provided identifier.
-
#checkbox_element(identifier = {:index => 0}) ⇒ Object
Finds a checkbox.
-
#checkbox_elements(identifier = {}) ⇒ Object
Finds all checkbox elements for the provided identifier.
-
#div_element(identifier = {:index => 0}) ⇒ Object
Finds a div.
-
#div_elements(identifier = {}) ⇒ Object
Finds all divs that match the provided identifier.
-
#element(tag, identifier = {:index => 0}) ⇒ Object
Finds an element.
-
#file_field_element(identifier = {:index => 0}) ⇒ Object
Finds a file field.
-
#file_field_elements(identifier = {}) ⇒ Object
Finds all file fields that match the provided identifier.
-
#form_element(identifier = {:index => 0}) ⇒ Object
Finds a form.
-
#form_elements(identifier = {}) ⇒ Object
Finds all forms that match the provided identifier.
-
#h1_element(identifier = {:index => 0}) ⇒ Object
Finds a h1.
-
#h1_elements(identifier = {}) ⇒ Object
Finds all h1 elements matching the identifier.
-
#h2_element(identifier = {:index => 0}) ⇒ Object
Finds a h2.
-
#h2_elements(identifier = {}) ⇒ Object
Finds all h2 elements matching the identifier.
-
#h3_element(identifier = {:index => 0}) ⇒ Object
Finds a h3.
-
#h3_elements(identifier = {}) ⇒ Object
Finds all h3 elements for the identifier.
-
#h4_element(identifier = {:index => 0}) ⇒ Object
Finds a h4.
-
#h4_elements(identifier = {}) ⇒ Object
Finds all h4 elements matching the identifier.
-
#h5_element(identifier = {:index => 0}) ⇒ Object
Finds a h5.
-
#h5_elements(identifier = {}) ⇒ Object
Finds all h5 elements for the identifier.
-
#h6_element(identifier = {:index => 0}) ⇒ Object
Finds a h6.
-
#h6_elements(identifier = {}) ⇒ Object
Finds all h6 elements matching the identifier.
-
#hidden_field_element(identifier = {:index => 0}) ⇒ Object
Finds a hidden field.
-
#hidden_field_elements(identifier = {}) ⇒ Object
Finds all hidden fields that match the identifier.
-
#image_element(identifier = {:index => 0}) ⇒ Object
Finds an image.
-
#image_elements(identifier = {}) ⇒ Object
Finds all images that match the provided identifier.
-
#label_element(identifier = {:index => 0}) ⇒ Object
Finds a label.
-
#label_elements(identifier = {}) ⇒ Object
Finds all labels that match the provided identifier.
-
#link_element(identifier = {:index => 0}) ⇒ Object
Finds a link.
-
#link_elements(identifier = {}) ⇒ Object
Find all links for the provided identifier.
-
#list_item_element(identifier = {:index => 0}) ⇒ Object
Finds a list item.
-
#list_item_elements(identifier = {}) ⇒ Object
Finds all list items that match the identifier.
-
#ordered_list_element(identifier = {:index => 0}) ⇒ Object
Finds an ordered list.
-
#ordered_list_elements(identifier = {}) ⇒ Object
Finds all ordered lists that match the identifier.
-
#paragraph_element(identifier = {:index => 0}) ⇒ Object
Finds a paragraph.
-
#paragraph_elements(identifier = {}) ⇒ Object
Finds all paragraph elements.
-
#radio_button_element(identifier = {:index => 0}) ⇒ Object
Finds a radio button.
-
#radio_button_elements(identifier = {}) ⇒ Object
Finds all radio button elements that match the provided identifier.
-
#select_list_element(identifier = {:index => 0}) ⇒ Object
Finds a select list.
-
#select_list_elements(identifier = {}) ⇒ Object
Finds all select lists for the provided identifier.
-
#span_element(identifier = {:index => 0}) ⇒ Object
Finds a span.
-
#span_elements(identifier = {}) ⇒ Object
Finds all span elements that match the provided identifier.
-
#table_element(identifier = {:index => 0}) ⇒ Object
Finds a table.
-
#table_elements(identifier = {}) ⇒ Object
Finds all tables that match the provided identifier.
-
#text_area_element(identifier = {:index => 0}) ⇒ Object
Finds a text area.
-
#text_area_elements(identifier = {}) ⇒ Object
Finds all text areas for the provided identifier.
-
#text_field_element(identifier = {:index => 0}) ⇒ Object
Finds a text field.
-
#text_field_elements(identifier = {}) ⇒ Object
Finds all text fields that match the provided identifier.
-
#unordered_list_element(identifier = {:index => 0}) ⇒ Object
Finds an unordered list.
-
#unordered_list_elements(identifier = {}) ⇒ Object
Finds all unordered lists that match the identifier.
Instance Method Details
#button_element(identifier = {:index => 0}) ⇒ Object
Finds a button
21 22 23 |
# File 'lib/page-object/element_locators.rb', line 21 def (identifier={:index => 0}) platform.(identifier.clone) end |
#button_elements(identifier = {}) ⇒ Object
Finds all buttons that match the provided identifier
42 43 44 |
# File 'lib/page-object/element_locators.rb', line 42 def (identifier={}) platform.(identifier.clone) end |
#cell_element(identifier = {:index => 0}) ⇒ Object
Finds a table cell
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
848 849 850 |
# File 'lib/page-object/element_locators.rb', line 848 def label_elements(identifier={}) platform.labels_for(identifier.clone) end |
#link_element(identifier = {:index => 0}) ⇒ Object
Finds a link
215 216 217 |
# File 'lib/page-object/element_locators.rb', line 215 def link_element(identifier={:index => 0}) platform.link_for(identifier.clone) end |
#link_elements(identifier = {}) ⇒ Object
Find all links for the provided identifier
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
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
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
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
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
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
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
284 285 286 |
# File 'lib/page-object/element_locators.rb', line 284 def (identifier={:index => 0}) platform.(identifier.clone) end |
#radio_button_elements(identifier = {}) ⇒ Object
Finds all radio button elements that match the provided identifier
300 301 302 |
# File 'lib/page-object/element_locators.rb', line 300 def (identifier={}) platform.(identifier.clone) end |
#select_list_element(identifier = {:index => 0}) ⇒ Object
Finds a select list
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
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
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
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
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
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
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
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
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
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
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
558 559 560 |
# File 'lib/page-object/element_locators.rb', line 558 def unordered_list_elements(identifier={}) platform.unordered_lists_for(identifier.clone) end |