Module: Druid::ElementLocators
- Included in:
- Druid
- Defined in:
- lib/druid/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 check box.
-
#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 that match the provided identifier.
-
#h2_element(identifier = {:index => 0}) ⇒ Object
Finds a h2.
-
#h2_elements(identifier = {}) ⇒ Object
Finds all h2 elements that match the provided identifier.
-
#h3_element(identifier = {:index => 0}) ⇒ Object
Finds a h3.
-
#h3_elements(identifier = {}) ⇒ Object
Finds all h3 elements that match the provided identifier.
-
#h4_element(identifier = {:index => 0}) ⇒ Object
Finds a h4.
-
#h4_elements(identifier = {}) ⇒ Object
Finds all h4 elements that match the provided identifier.
-
#h5_element(identifier = {:index => 0}) ⇒ Object
Finds a h5.
-
#h5_elements(identifier = {}) ⇒ Object
Finds all h5 elements that match the provided identifier.
-
#h6_element(identifier = {:index => 0}) ⇒ Object
Finds a h6.
-
#h6_elements(identifier = {}) ⇒ Object
Finds all h6 elements that match the provided 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
Finds 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 provided identifier.
-
#paragraph_element(identifier = {:index => 0}) ⇒ Object
Finds a paragraph.
-
#paragraph_elements(identifier = {}) ⇒ Object
Finds all paragraph elements that match the provided identifier.
-
#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 with 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 provided identifier.
Instance Method Details
#button_element(identifier = {:index => 0}) ⇒ Object
Finds a button
21 22 23 |
# File 'lib/druid/element_locators.rb', line 21 def (identifier={:index => 0}) identifier.clone end |
#button_elements(identifier = {}) ⇒ Object
Finds all buttons that match the provided identifier
42 43 44 |
# File 'lib/druid/element_locators.rb', line 42 def (identifier={}) identifier.clone end |
#cell_element(identifier = {:index => 0}) ⇒ Object
Finds a table cell
419 420 421 |
# File 'lib/druid/element_locators.rb', line 419 def cell_element(identifier={:index => 0}) cell_for identifier.clone end |
#cell_elements(identifier = {}) ⇒ Object
Finds all table cell elements that match the provided identifier
436 437 438 |
# File 'lib/druid/element_locators.rb', line 436 def cell_elements(identifier={}) cells_for identifier.clone end |
#checkbox_element(identifier = {:index => 0}) ⇒ Object
Finds a check box
255 256 257 |
# File 'lib/druid/element_locators.rb', line 255 def checkbox_element(identifier={:index => 0}) checkbox_for identifier.clone end |
#checkbox_elements(identifier = {}) ⇒ Object
Finds all checkbox elements for the provided identifier
272 273 274 |
# File 'lib/druid/element_locators.rb', line 272 def checkbox_elements(identifier={}) checkboxes_for identifier.clone end |
#div_element(identifier = {:index => 0}) ⇒ Object
Finds a div
321 322 323 |
# File 'lib/druid/element_locators.rb', line 321 def div_element(identifier={:index => 0}) div_for identifier.clone end |
#div_elements(identifier = {}) ⇒ Object
Finds all divs that match the provided identifier
338 339 340 |
# File 'lib/druid/element_locators.rb', line 338 def div_elements(identifier={}) divs_for identifier end |
#element(tag, identifier = {:index => 0}) ⇒ Object
Finds an element
914 915 916 |
# File 'lib/druid/element_locators.rb', line 914 def element(tag, identifier={:index => 0}) element_for(tag, identifier.clone) end |
#file_field_element(identifier = {:index => 0}) ⇒ Object
Finds a file field
847 848 849 |
# File 'lib/druid/element_locators.rb', line 847 def file_field_element(identifier={:index => 0}) file_field_for identifier.clone end |
#file_field_elements(identifier = {}) ⇒ Object
Finds all file fields that match the provided identifier
864 865 866 |
# File 'lib/druid/element_locators.rb', line 864 def file_field_elements(identifier={}) file_fields_for identifier.clone end |
#form_element(identifier = {:index => 0}) ⇒ Object
Finds a form
488 489 490 |
# File 'lib/druid/element_locators.rb', line 488 def form_element(identifier={:index => 0}) form_for identifier.clone end |
#form_elements(identifier = {}) ⇒ Object
Finds all forms that match the provided identifier
504 505 506 |
# File 'lib/druid/element_locators.rb', line 504 def form_elements(identifier={}) forms_for identifier.clone end |
#h1_element(identifier = {:index => 0}) ⇒ Object
Finds a h1
616 617 618 |
# File 'lib/druid/element_locators.rb', line 616 def h1_element(identifier={:index => 0}) h1_for identifier.clone end |
#h1_elements(identifier = {}) ⇒ Object
Finds all h1 elements that match the provided identifier
633 634 635 |
# File 'lib/druid/element_locators.rb', line 633 def h1_elements(identifier={}) h1s_for identifier.clone end |
#h2_element(identifier = {:index => 0}) ⇒ Object
Finds a h2
649 650 651 |
# File 'lib/druid/element_locators.rb', line 649 def h2_element(identifier={:index => 0}) h2_for identifier.clone end |
#h2_elements(identifier = {}) ⇒ Object
Finds all h2 elements that match the provided identifier
666 667 668 |
# File 'lib/druid/element_locators.rb', line 666 def h2_elements(identifier={}) h2s_for identifier.clone end |
#h3_element(identifier = {:index => 0}) ⇒ Object
Finds a h3
682 683 684 |
# File 'lib/druid/element_locators.rb', line 682 def h3_element(identifier={:index => 0}) h3_for identifier.clone end |
#h3_elements(identifier = {}) ⇒ Object
Finds all h3 elements that match the provided identifier
699 700 701 |
# File 'lib/druid/element_locators.rb', line 699 def h3_elements(identifier={}) h3s_for identifier.clone end |
#h4_element(identifier = {:index => 0}) ⇒ Object
Finds a h4
715 716 717 |
# File 'lib/druid/element_locators.rb', line 715 def h4_element(identifier={:index => 0}) h4_for identifier.clone end |
#h4_elements(identifier = {}) ⇒ Object
Finds all h4 elements that match the provided identifier
732 733 734 |
# File 'lib/druid/element_locators.rb', line 732 def h4_elements(identifier={}) h4s_for identifier.clone end |
#h5_element(identifier = {:index => 0}) ⇒ Object
Finds a h5
748 749 750 |
# File 'lib/druid/element_locators.rb', line 748 def h5_element(identifier={:index => 0}) h5_for identifier.clone end |
#h5_elements(identifier = {}) ⇒ Object
Finds all h5 elements that match the provided identifier
765 766 767 |
# File 'lib/druid/element_locators.rb', line 765 def h5_elements(identifier={}) h5s_for identifier.clone end |
#h6_element(identifier = {:index => 0}) ⇒ Object
Finds a h6
781 782 783 |
# File 'lib/druid/element_locators.rb', line 781 def h6_element(identifier={:index => 0}) h6_for identifier.clone end |
#h6_elements(identifier = {}) ⇒ Object
Finds all h6 elements that match the provided identifier
798 799 800 |
# File 'lib/druid/element_locators.rb', line 798 def h6_elements(identifier={}) h6s_for identifier.clone end |
#hidden_field_element(identifier = {:index => 0}) ⇒ Object
Finds a hidden field
103 104 105 |
# File 'lib/druid/element_locators.rb', line 103 def hidden_field_element(identifier={:index => 0}) hidden_field_for identifier.clone end |
#hidden_field_elements(identifier = {}) ⇒ Object
Finds all hidden fields that match the identifier
124 125 126 |
# File 'lib/druid/element_locators.rb', line 124 def hidden_field_elements(identifier={}) hidden_fields_for identifier.clone end |
#image_element(identifier = {:index => 0}) ⇒ Object
Finds an image
454 455 456 |
# File 'lib/druid/element_locators.rb', line 454 def image_element(identifier={:index => 0}) image_for identifier.clone end |
#image_elements(identifier = {}) ⇒ Object
Finds all images that match the provided identifier
472 473 474 |
# File 'lib/druid/element_locators.rb', line 472 def image_elements(identifier={}) images_for identifier.clone end |
#label_element(identifier = {:index => 0}) ⇒ Object
Finds a label
881 882 883 |
# File 'lib/druid/element_locators.rb', line 881 def label_element(identifier={:index => 0}) label_for identifier.clone end |
#label_elements(identifier = {}) ⇒ Object
Finds all labels that match the provided identifier
898 899 900 |
# File 'lib/druid/element_locators.rb', line 898 def label_elements(identifier={}) labels_for identifier.clone end |
#link_element(identifier = {:index => 0}) ⇒ Object
Finds a link
217 218 219 |
# File 'lib/druid/element_locators.rb', line 217 def link_element(identifier={:index => 0}) link_for identifier.clone end |
#link_elements(identifier = {}) ⇒ Object
Finds all links for the provided identifier
238 239 240 |
# File 'lib/druid/element_locators.rb', line 238 def link_elements(identifier={}) links_for identifier.clone end |
#list_item_element(identifier = {:index => 0}) ⇒ Object
Finds a list item
520 521 522 |
# File 'lib/druid/element_locators.rb', line 520 def list_item_element(identifier={:index => 0}) list_item_for identifier.clone end |
#list_item_elements(identifier = {}) ⇒ Object
Finds all list items that match the identifier
536 537 538 |
# File 'lib/druid/element_locators.rb', line 536 def list_item_elements(identifier={}) list_items_for identifier.clone end |
#ordered_list_element(identifier = {:index => 0}) ⇒ Object
Finds an ordered list
552 553 554 |
# File 'lib/druid/element_locators.rb', line 552 def ordered_list_element(identifier={:index => 0}) ordered_list_for identifier.clone end |
#ordered_list_elements(identifier = {}) ⇒ Object
Finds all ordered lists that match the provided identifier
568 569 570 |
# File 'lib/druid/element_locators.rb', line 568 def ordered_list_elements(identifier={}) ordered_lists_for identifier.clone end |
#paragraph_element(identifier = {:index => 0}) ⇒ Object
Finds a paragraph
814 815 816 |
# File 'lib/druid/element_locators.rb', line 814 def paragraph_element(identifier={:index => 0}) paragraph_for identifier.clone end |
#paragraph_elements(identifier = {}) ⇒ Object
Finds all paragraph elements that match the provided identifier
830 831 832 |
# File 'lib/druid/element_locators.rb', line 830 def paragraph_elements(identifier={}) paragraphs_for identifier.clone end |
#radio_button_element(identifier = {:index => 0}) ⇒ Object
Finds a radio button
288 289 290 |
# File 'lib/druid/element_locators.rb', line 288 def (identifier={:index => 0}) identifier.clone end |
#radio_button_elements(identifier = {}) ⇒ Object
Finds all radio button elements that match the provided identifier
304 305 306 |
# File 'lib/druid/element_locators.rb', line 304 def (identifier={}) identifier.clone end |
#select_list_element(identifier = {:index => 0}) ⇒ Object
Finds a select list
178 179 180 |
# File 'lib/druid/element_locators.rb', line 178 def select_list_element(identifier={:index => 0}) select_list_for identifier.clone end |
#select_list_elements(identifier = {}) ⇒ Object
Finds all select lists for the provided identifier
196 197 198 |
# File 'lib/druid/element_locators.rb', line 196 def select_list_elements(identifier={}) select_lists_for identifier.clone end |
#span_element(identifier = {:index => 0}) ⇒ Object
Finds a span
354 355 356 |
# File 'lib/druid/element_locators.rb', line 354 def span_element(identifier={:index => 0}) span_for identifier.clone end |
#span_elements(identifier = {}) ⇒ Object
Finds all span elements that match the provided identifier
370 371 372 |
# File 'lib/druid/element_locators.rb', line 370 def span_elements(identifier={}) spans_for identifier.clone end |
#table_element(identifier = {:index => 0}) ⇒ Object
Finds a table
386 387 388 |
# File 'lib/druid/element_locators.rb', line 386 def table_element(identifier={:index => 0}) table_for identifier.clone end |
#table_elements(identifier = {}) ⇒ Object
Finds all tables with match the provided identifier
402 403 404 |
# File 'lib/druid/element_locators.rb', line 402 def table_elements(identifier={}) tables_for identifier.clone end |
#text_area_element(identifier = {:index => 0}) ⇒ Object
Finds a text area
142 143 144 |
# File 'lib/druid/element_locators.rb', line 142 def text_area_element(identifier={:index => 0}) text_area_for identifier.clone end |
#text_area_elements(identifier = {}) ⇒ Object
Finds all text areas for the provided identifier
160 161 162 |
# File 'lib/druid/element_locators.rb', line 160 def text_area_elements(identifier={}) text_areas_for identifier.clone end |
#text_field_element(identifier = {:index => 0}) ⇒ Object
Finds a text field
62 63 64 |
# File 'lib/druid/element_locators.rb', line 62 def text_field_element(identifier={:index => 0}) text_field_for identifier.clone end |
#text_field_elements(identifier = {}) ⇒ Object
Finds all text fields that match the provided identifier
83 84 85 |
# File 'lib/druid/element_locators.rb', line 83 def text_field_elements(identifier={}) text_fields_for identifier.clone end |
#unordered_list_element(identifier = {:index => 0}) ⇒ Object
Finds an unordered list
584 585 586 |
# File 'lib/druid/element_locators.rb', line 584 def unordered_list_element(identifier={:index => 0}) unordered_list_for identifier.clone end |
#unordered_list_elements(identifier = {}) ⇒ Object
Finds all unordered lists that match the provided identifier
600 601 602 |
# File 'lib/druid/element_locators.rb', line 600 def unordered_list_elements(identifier={}) unordered_lists_for identifier.clone end |