Module: PageObject::ElementLocators
- Included in:
- PageObject
- Defined in:
- lib/page-object/element_locators.rb
Instance Method Summary collapse
-
#button_element(identifier) ⇒ Object
Finds a button.
-
#button_elements(identifier) ⇒ Object
Finds all buttons that match the provided identifier.
-
#cell_element(identifier) ⇒ Object
Finds a table cell.
-
#cell_elements(identifier) ⇒ Object
Finds all table cell elements that match the provided identifier.
-
#checkbox_element(identifier) ⇒ Object
Finds a checkbox.
-
#checkbox_elements(identifier) ⇒ Object
Finds all checkbox elements for the provided identifier.
-
#div_element(identifier) ⇒ Object
Finds a div.
-
#div_elements(identifier) ⇒ Object
Finds all divs that match the provided identifier.
-
#file_field_element(identifier) ⇒ Object
Finds a paragraph.
-
#form_element(identifier) ⇒ Object
Finds a form.
-
#form_elements(identifier) ⇒ Object
Finds all forms that match the provided identifier.
-
#h1_element(identifier) ⇒ Object
Finds a h1.
-
#h1_elements(identifier) ⇒ Object
Finds all h1 elements matching the identifier.
-
#h2_element(identifier) ⇒ Object
Finds a h2.
-
#h2_elements(identifier) ⇒ Object
Finds all h2 elements matching the identifier.
-
#h3_element(identifier) ⇒ Object
Finds a h3.
-
#h3_elements(identifier) ⇒ Object
Finds all h3 elements for the identifier.
-
#h4_element(identifier) ⇒ Object
Finds a h4.
-
#h4_elements(identifier) ⇒ Object
Finds all h4 elements matching the identifier.
-
#h5_element(identifier) ⇒ Object
Finds a h5.
-
#h5_elements(identifier) ⇒ Object
Finds all h5 elements for the identifier.
-
#h6_element(identifier) ⇒ Object
Finds a h6.
-
#h6_elements(identifier) ⇒ Object
Finds all h6 elements matching the identifier.
-
#hidden_field_element(identifier) ⇒ Object
Finds a hidden field.
-
#hidden_field_elements(identifier) ⇒ Object
Finds all hidden fields that match the identifier.
-
#image_element(identifier) ⇒ Object
Finds an image.
-
#image_elements(identifier) ⇒ Object
Finds all images that match the provided identifier.
-
#link_element(identifier) ⇒ Object
Finds a link.
-
#link_elements(identifier) ⇒ Object
Find all links for the provided identifier.
-
#list_item_element(identifier) ⇒ Object
Finds a list item.
-
#list_item_elements(identifier) ⇒ Object
Finds all list items that match the identifier.
-
#ordered_list_element(identifier) ⇒ Object
Finds an ordered list.
-
#ordered_list_elements(identifier) ⇒ Object
Finds all ordered lists that match the identifier.
-
#paragraph_element(identifier) ⇒ Object
Finds a paragraph.
-
#paragraph_elements(identifier) ⇒ Object
Finds all paragraph elements.
-
#radio_button_element(identifier) ⇒ Object
Finds a radio button.
-
#radio_button_elements(identifier) ⇒ Object
Finds all radio button elements that match the provided identifier.
-
#select_list_element(identifier) ⇒ Object
Finds a select list.
-
#select_list_elements(identifier) ⇒ Object
Finds all select lists for the provided identifier.
-
#span_element(identifier) ⇒ Object
Finds a span.
-
#span_elements(identifier) ⇒ Object
Finds all span elements that match the provided identifier.
-
#table_element(identifier) ⇒ Object
Finds a table.
-
#table_elements(identifier) ⇒ Object
Finds all tables that match the provided identifier.
-
#text_area_element(identifier) ⇒ Object
Finds a text area.
-
#text_area_elements(identifier) ⇒ Object
Finds all text areas for the provided identifier.
-
#text_field_element(identifier) ⇒ Object
Finds a text field.
-
#text_field_elements(identifier) ⇒ Object
Finds all text fields that match the provided identifier.
-
#unordered_list_element(identifier) ⇒ Object
Finds an unordered list.
-
#unordered_list_elements(identifier) ⇒ Object
Finds all unordered lists that match the identifier.
Instance Method Details
#button_element(identifier) ⇒ Object
Finds a button
19 20 21 |
# File 'lib/page-object/element_locators.rb', line 19 def (identifier) platform.(identifier.clone) end |
#button_elements(identifier) ⇒ Object
Finds all buttons that match the provided identifier
38 39 40 |
# File 'lib/page-object/element_locators.rb', line 38 def (identifier) platform.(identifier.clone) end |
#cell_element(identifier) ⇒ Object
Finds a table cell
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
434 435 436 |
# File 'lib/page-object/element_locators.rb', line 434 def image_elements(identifier) platform.images_for(identifier.clone) end |
#link_element(identifier) ⇒ Object
Finds a link
201 202 203 |
# File 'lib/page-object/element_locators.rb', line 201 def link_element(identifier) platform.link_for(identifier.clone) end |
#link_elements(identifier) ⇒ Object
Find all links for the provided identifier
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
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
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
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
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
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
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
265 266 267 |
# File 'lib/page-object/element_locators.rb', line 265 def (identifier) platform.(identifier.clone) end |
#radio_button_elements(identifier) ⇒ Object
Finds all radio button elements that match the provided identifier
280 281 282 |
# File 'lib/page-object/element_locators.rb', line 280 def (identifier) platform.(identifier.clone) end |
#select_list_element(identifier) ⇒ Object
Finds a select list
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
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
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
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
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
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
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
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
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
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
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
522 523 524 |
# File 'lib/page-object/element_locators.rb', line 522 def unordered_list_elements(identifier) platform.unordered_lists_for(identifier.clone) end |