Module: Awetestlib::Regression::Legacy
- Included in:
- Runner
- Defined in:
- lib/awetestlib/regression/legacy.rb
Overview
Backward compatible methods and alias to support earlier versions of the Awetest DSL. These are deprecated in favor of the methods actually called within them. Work in Progress
Click (UserInput) collapse
-
#click_button_by_class(browser, what, desc = '') ⇒ Boolean
Click a button element identified by the value of its :class attribute.
-
#click_button_by_id(browser, what, desc = '') ⇒ Boolean
Click a button element identified by the value of its :id attribute.
-
#click_button_by_index(browser, what, desc = '') ⇒ Boolean
Click a button element identified by the value of its index within the container referred to by browser.
-
#click_button_by_name(browser, what, desc = '') ⇒ Boolean
Click a button element identified by the value of its :name attribute.
-
#click_button_by_text(browser, what, desc = '') ⇒ Boolean
Click a button element identified by the value of its :text attribute.
-
#click_button_by_title(browser, what, desc = '') ⇒ Boolean
Click a button element identified by the value of its :title attribute.
-
#click_button_by_value(browser, what, desc = '') ⇒ Boolean
Click a button element identified by the value of its :value attribute.
-
#click_file_field_by_id(browser, what, desc = '') ⇒ Boolean
Click a file_field element identified by the value of its :id attribute.
-
#click_img_by_alt(browser, what, desc = '') ⇒ Boolean
Click an image element identified by the value of its :id attribute.
-
#click_img_by_src(browser, what, desc = '') ⇒ Boolean
Click an image element identified by the value of its :src attribute.
-
#click_img_by_title(browser, what, desc = '') ⇒ Boolean
Click an image element identified by the value of its :title attribute.
- #click_js(browser, element, how, what, desc = '') ⇒ Object
-
#click_link_by_class(browser, what, desc = '') ⇒ Boolean
(also: #click_class)
Click a link element identified by the value of its :class attribute.
-
#click_link_by_href(browser, what, desc = '') ⇒ Boolean
(also: #click_href)
Click a link element identified by the value of its :href attribute.
-
#click_link_by_id(browser, what, desc = '') ⇒ Boolean
(also: #click_id)
Click a link element identified by the value of its :id attribute.
-
#click_link_by_index(browser, what, desc = '') ⇒ Boolean
Click a button element identified by the value of its index within the container referred to by browser.
-
#click_link_by_name(browser, what, desc = '') ⇒ Boolean
(also: #click_name)
Click a link element identified by the value of its :name attribute.
-
#click_link_by_text(browser, what, desc = '') ⇒ Boolean
(also: #click_link, #click_text, #click_js_button)
Click a link element identified by the value in its text (innerHTML).
-
#click_link_by_title(browser, what, desc = '') ⇒ Boolean
(also: #click_title)
Click a link element identified by the value of its :title attribute.
-
#click_link_by_value(browser, what, desc = '') ⇒ Boolean
Click a link element identified by the value of its :value attribute.
-
#click_span_by_text(browser, what, desc = '') ⇒ Boolean
(also: #click_span_with_text)
Click a span element identified by the value in its text (innerHTML).
Click No Wait (UserInput) collapse
-
#click_button_no_wait_by_class(browser, what, desc = '') ⇒ Boolean
(also: #click_button_by_class_no_wait)
Click a button element identified by the value of its :class attribute and do not wait for the browser to reach ready state.
-
#click_button_no_wait_by_id(browser, what, desc = '') ⇒ Boolean
(also: #click_button_by_id_no_wait)
Click a button element identified by the value of its :id attribute and do not wait for the browser to reach ready state.
-
#click_button_no_wait_by_name(browser, what, desc = '') ⇒ Boolean
Click a button element identified by the value of its :name attribute and do not wait for the browser to reach ready state.
-
#click_button_no_wait_by_text(browser, what, desc = '') ⇒ Boolean
Click a button element identified by the value in its text (innerHTML) and do not wait for the browser to reach ready state.
-
#click_button_no_wait_by_value(browser, what, desc = '') ⇒ Boolean
Click a button element identified by the value of its :value attribute and do not wait for the browser to reach ready state.
-
#click_img_no_wait_by_alt(browser, what, desc = '') ⇒ Boolean
(also: #click_img_by_alt_no_wait)
Click an image element identified by the value of its :alt attribute and do not wait for the browser to reach ready state.
-
#click_link_by_name_no_wait(browser, what, desc = '') ⇒ Boolean
(also: #click_no_wait_name, #click_name_no_wait)
Click a button element identified by the value of its :name attribute and do not wait for the browser to reach ready state.
-
#click_link_by_text_no_wait(browser, what, desc = '') ⇒ Boolean
(also: #click_no_wait_text, #click_text_no_wait)
Click a link element identified by the value in its text (innerHTML) and do not wait for the browser to reach ready state.
-
#click_link_no_wait_by_href(browser, what, desc = '') ⇒ Boolean
(also: #click_href_no_wait)
Click a link element identified by the value of its :href attribute and do not wait for the browser to reach ready state.
-
#click_link_no_wait_by_id(browser, what, desc = '') ⇒ Boolean
(also: #click_no_wait_id, #click_no_wait_by_id, #click_id_no_wait, #click_no_wait_link_by_id)
Click a link element identified by the value of its :id attribute and do not wait for the browser to reach ready state.
-
#click_title_no_wait(browser, what, desc = '') ⇒ Boolean
Click a link element identified by the value of its :title attribute and do not wait for the browser to reach ready state.
Xpath (UserInput) collapse
-
#click_button_by_xpath_and_id(browser, what, desc = '') ⇒ Boolean
(also: #click_button_by_xpath)
Click a button element identified by the value of its :id attribute using the xpath functionality in Watir.
-
#click_img_by_xpath_and_name(browser, what, desc = '') ⇒ Boolean
(also: #click_img_by_xpath, #click_image_by_xpath, #click_image_by_xpath_and_name)
Click an image element identified by the value of its :name attribute using the xpath functionality in Watir.
-
#click_link_by_xpath_and_id(browser, what, desc = '') ⇒ Boolean
(also: #click_link_by_xpath)
Click a link element identified by the value of its :id attribute using the xpath functionality in Watir.
Tables (UserInput) collapse
-
#click_table_row_with_text_by_id(browser, what, text, desc = '', column = nil) ⇒ Boolean
Click the first row which contains a particular string in a table identified by the value in its :id attribute.
-
#click_table_row_with_text_by_index(browser, what, text, desc = '', column = nil) ⇒ Boolean
Click the first row which contains a particular string in a table identified by its index in the array of tables contained in browser.
-
#double_click_table_row_with_text_by_id(browser, what, text, desc = '', column = nil) ⇒ Boolean
Double click the first row which contains a particular string in a table identified by the value in its :id attribute.
-
#double_click_table_row_with_text_by_index(browser, what, text, desc = '', column = nil) ⇒ Boolean
Double click the first row which contains a particular string in a table identified by its index in the array of tables contained in browser.
Select (UserInput) collapse
-
#select_option_by_class_and_option_text(browser, what, option, desc = '') ⇒ Boolean
Select option from select list (dropdown) identified by the value in its :class attribute.
-
#select_option_by_id_and_index(browser, what, index, desc = '') ⇒ Boolean
Select option from select list (dropdown) identified by the value in its :id attribute.
-
#select_option_by_id_and_option_text(browser, what, option, nofail = false, desc = '') ⇒ Boolean
(also: #select_option_by_id, #select_option_by_id_and_text)
Select option from select list (dropdown) identified by the value in its :id attribute.
-
#select_option_by_id_and_option_value(browser, what, option, desc = '') ⇒ Boolean
Select option from select list (dropdown) identified by the value in its :id attribute.
-
#select_option_by_name_and_index(browser, what, option, desc = '') ⇒ Boolean
Select option from select list (dropdown) identified by the value in its :name attribute.
-
#select_option_by_name_and_option_text(browser, what, option, desc = '') ⇒ Boolean
(also: #select_option_by_name)
Select option from select list (dropdown) identified by the value in its :name attribute.
-
#select_option_by_name_and_option_value(browser, what, option, desc = '') ⇒ Boolean
Select option from select list (dropdown) identified by the value in its :name attribute.
-
#select_option_by_title_and_option_text(browser, what, option, desc = '') ⇒ Boolean
Select option from select list (dropdown) identified by the value in its :name attribute.
-
#select_option_by_xpath_and_index(browser, what, option, desc = '') ⇒ Boolean
Select option from select list (dropdown) identified by the xpath command supplied in what.
Set (UserInput) collapse
-
#set_checkbox(browser, how, what, value = nil, desc = '') ⇒ Boolean
Set checkbox as checked.
-
#set_checkbox_by_class(browser, what, value = nil, desc = '') ⇒ Boolean
Set checkbox as checked identified by its :class attribute with the value in what.
-
#set_checkbox_by_id(browser, what, value = nil, desc = '') ⇒ Boolean
Set checkbox as checked identified by its :class attribute with the value in what.
-
#set_checkbox_by_name(browser, what, value = nil, desc = '') ⇒ Boolean
Set checkbox as checked identified by its :name attribute with the value in what.
-
#set_checkbox_by_title(browser, what, value = nil, desc = '') ⇒ Boolean
Set checkbox as checked identified by its :title attribute with the value in what.
-
#set_checkbox_by_value(browser, what, desc = '') ⇒ Boolean
Set checkbox as checked identified by its :value attribute with the value in what.
-
#set_file_field_by_id(browser, what, filespec, desc = '') ⇒ Boolean
Set file field element, identified by its :id attribute with the value in what.
-
#set_file_field_by_name(browser, what, filespec, desc = '') ⇒ Boolean
Set file field element, identified by its :name attribute with the value in what.
-
#set_radio(browser, how, what, value = nil, desc = '') ⇒ Boolean
Set radio button as set.
-
#set_radio_by_class(browser, what, value = nil, desc = '') ⇒ Object
Set radio button as set identified by its :class attribute with the value in what.
-
#set_radio_by_id(browser, what, value = nil, desc = '') ⇒ Boolean
Set radio button as set identified by its :id attribute with the value in what.
-
#set_radio_by_index(browser, index, desc = '') ⇒ Boolean
Set radio button as set identified by its index within the array of radio buttons found in the container specified by browser.
-
#set_radio_by_name(browser, what, value = nil, desc = '') ⇒ Boolean
Set radio button as set identified by its :name attribute with the value in what.
-
#set_radio_by_name_and_index(browser, what, index, desc = '') ⇒ Boolean
Set radio button as set identified by its :name attribute with the value in what and its index within the array of radio buttons with that :name.
-
#set_radio_by_name_and_text(browser, what, text, desc = '') ⇒ Boolean
Set radio button as set identified by its :name attribute with the value in what and its index within the array of radio buttons with that :name.
-
#set_radio_by_name_and_value(browser, what, value, desc = '') ⇒ Boolean
Set radio button as set identified by its :name attribute with the value in what and the :value attribute with the value in value.
-
#set_radio_by_title(browser, what, value = nil, desc = '') ⇒ Boolean
Set radio button as set identified by its :title attribute with the value in what.
-
#set_radio_by_value(browser, what, desc = '') ⇒ Boolean
Set radio button as set identified by its :value attribute with the value in what.
-
#set_radio_by_value_and_index(browser, value, index, desc = '') ⇒ Boolean
Set radio button as set identified by its :value attribute with the value in what and its index within the array of radio buttons with that :name.
-
#set_textfield_by_class(browser, what, value, desc = '', skip_value_check = false) ⇒ Object
Set text field as identified by its :class attribute with value in what to the string specified in value.
-
#set_textfield_by_id(browser, what, value, desc = '', skip_value_check = false) ⇒ Boolean
Set text field as identified by its :id attribute with value in what to the string specified in value.
-
#set_textfield_by_name(browser, what, value, desc = '', skip_value_check = false) ⇒ Boolean
Set text field as identified by its :name attribute with value in what to the string specified in value.
-
#set_textfield_by_title(browser, what, value, desc = '', skip_value_check = false) ⇒ Boolean
Set text field as identified by its :class attribute with value in what to the string specified in value.
Clear (UserInput) collapse
-
#clear_checkbox(browser, how, what, value = nil, desc = '') ⇒ Boolean
Clear (uncheck) checkbox identified by the attribute specified in how with value what.
-
#clear_checkbox_by_id(browser, strg, value = nil, desc = '') ⇒ Boolean
Clear (uncheck) checkbox identified by its :id attribute with value what.
-
#clear_checkbox_by_name(browser, what, value = nil, desc = '') ⇒ Boolean
Clear (uncheck) checkbox identified by its :name attribute with value what.
-
#clear_radio(browser, how, what, value = nil, desc = '') ⇒ Boolean
Clear (unset) radio button identified by the attribute specified in how with value what.
Fire Event (UserInput) collapse
-
#fire_event_on_image_by_src(browser, what, event, desc = '') ⇒ Boolean
(also: #fire_event_src, #fire_event_image_by_src)
Fire an event on a image element identified by the value in its :src attribute.
-
#fire_event_on_link_by_id(browser, what, event, desc = '') ⇒ Boolean
(also: #fire_event_id, #fire_event_by_id)
Fire an event on a link element identified by the value in its :id attribute.
-
#fire_event_on_link_by_text(browser, what, event, desc = '') ⇒ Boolean
(also: #fire_event_text, #fire_event_by_text)
Fire an event on a link element identified by the value in its text (innerHTML).
Validations collapse
- #check_element_is_disabled(browser, element, how, what, desc = '') ⇒ Object
-
#checkbox_is_disabled?(browser, what, desc = '') ⇒ Boolean
(also: #validate_check_disabled)
True if the answer to the assertion expressed in the called method name is yes.
-
#checkbox_is_enabled?(browser, what, desc = '') ⇒ Boolean
(also: #validate_check_enabled)
True if the answer to the assertion expressed in the called method name is yes.
-
#checkbox_not_checked?(browser, what, desc) ⇒ Boolean
(also: #validate_not_check)
True if the answer to the assertion expressed in the called method name is yes.
-
#checked_by_id?(browser, what, desc = '') ⇒ Boolean
(also: #validate_check, #checkbox_is_checked?)
True if the answer to the assertion expressed in the called method name is yes.
-
#link_disabled?(browser, what, desc = '') ⇒ Boolean
(also: #validate_link_not_enabled)
Verify that div identified by :text is disabled.
-
#link_enabled?(browser, what, desc = '') ⇒ Boolean
(also: #validate_link_enabled, #check_link_enabled)
Verify that div click_button_by_id by :text is enabled.
-
#link_not_exist?(browser, what, desc = '') ⇒ Boolean
(also: #validate_link_not_exist)
Verify that link identified by :text does not exist.
-
#radio_is_set?(browser, what, desc = '') ⇒ Boolean
(also: #validate_radioset, #validate_radio_set)
True if the answer to the assertion expressed in the called method name is yes.
-
#span_contains_text?(browser, how, what, expected, desc = '') ⇒ Boolean
(also: #valid_text_in_span)
True if the answer to the assertion expressed in the called method name is yes.
-
#text_in_span_equals?(browser, how, what, expected, desc = '') ⇒ Boolean
True if the answer to the assertion expressed in the called method name is yes.
-
#validate_check_by_class(browser, what, desc) ⇒ Boolean
True if the answer to the assertion expressed in the called method name is yes.
-
#validate_div_not_visible_by_id(browser, what, desc = '') ⇒ Boolean
Verify that div identified by :id is not visible.
-
#validate_div_visible_by_id(browser, what, desc = '') ⇒ Boolean
Verify that div identified by :id is visible.
-
#validate_image(browser, what, desc = '', nofail = false) ⇒ Boolean
True if the answer to the assertion expressed in the called method name is yes.
-
#validate_link_exist(browser, what, desc = '') ⇒ Boolean
Verify that link identified by :text exists.
-
#validate_list(browser, what, expected, desc = '') ⇒ Boolean
Verify that select list, identified by :id and what contains text and select it if present.
-
#validate_no_list(browser, what, expected, desc = '') ⇒ Boolean
Verify select list, identified by :id, does not contain text.
-
#validate_radio_not_set(browser, what, desc = '') ⇒ Boolean
(also: #validate_not_radioset)
True if the answer to the assertion expressed in the called method name is yes.
-
#validate_radioset_by_name(browser, what, desc = '') ⇒ Boolean
True if the answer to the assertion expressed in the called method name is yes.
-
#validate_text_in_span_by_id(browser, what, expected, desc = '') ⇒ Boolean
True if the answer to the assertion expressed in the called method name is yes.
-
#validate_textfield_disabled_by_name(browser, what, desc = '') ⇒ Boolean
(also: #disabled_textfield_by_name)
True if the answer to the assertion expressed in the called method name is yes.
-
#validate_textfield_empty_by_id(browser, what, desc = '') ⇒ Boolean
True if the answer to the assertion expressed in the called method name is yes.
-
#validate_textfield_empty_by_name(browser, what, desc = '') ⇒ Boolean
True if the answer to the assertion expressed in the called method name is yes.
-
#validate_textfield_empty_by_title(browser, what, desc = '') ⇒ Boolean
True if the answer to the assertion expressed in the called method name is yes.
-
#validate_textfield_enabled_by_name(browser, what, desc = '') ⇒ Boolean
(also: #enabled_textfield_by_name)
True if the answer to the assertion expressed in the called method name is yes.
-
#validate_textfield_not_value_by_id(browser, what, value, desc = '') ⇒ Boolean
(also: #validate_textfield_no_value_by_id)
True if the answer to the assertion expressed in the called method name is yes.
-
#validate_textfield_not_value_by_name(browser, what, value, desc = '') ⇒ Boolean
(also: #validate_textfield_no_value_by_name)
True if the answer to the assertion expressed in the called method name is yes.
-
#validate_textfield_not_visible_by_name(browser, what, desc = '') ⇒ Boolean
(also: #visible_no_textfield_by_name)
True if the answer to the assertion expressed in the called method name is yes.
-
#validate_textfield_value_by_id(browser, what, expected, desc = '') ⇒ Boolean
True if the answer to the assertion expressed in the called method name is yes.
-
#validate_textfield_value_by_name(browser, what, expected, desc = '') ⇒ Boolean
True if the answer to the assertion expressed in the called method name is yes.
-
#validate_textfield_visible_by_name(browser, what, desc = '') ⇒ Boolean
(also: #visible_textfield_by_name)
True if the answer to the assertion expressed in the called method name is yes.
Find collapse
-
#get_div_by_class(browser, what, desc = '', dbg = false) ⇒ Water::Div
Return a reference to a div element identified by its :class attribute.
-
#get_div_by_id(browser, what, desc = '', dbg = false) ⇒ Water::Div
Return a reference to a div element identified by its :id attribute.
-
#get_div_by_text(browser, what, desc = '', dbg = false) ⇒ Water::Div
Return a reference to a div element identified by its :text attribute.
-
#get_form_by_id(browser, what, desc = '') ⇒ Water::Form
Return a reference to a form element identified by its :id attribute.
-
#get_frame_by_id(browser, what, desc = '') ⇒ Water::Frame
Return a reference to a frame element identified by its :id attribute.
-
#get_frame_by_index(browser, what, desc = '') ⇒ Water::Frame
Return a reference to a frame element identified by its :index within browser.
-
#get_frame_by_name(browser, what, desc = '') ⇒ Water::Frame
Return a reference to a frame element identified by its :name attribute.
-
#get_select_options_by_id(browser, what, dbg = false) ⇒ Array
Return the list of options in a select list identified by its :id attribute.
-
#get_select_options_by_name(browser, what, dbg = false) ⇒ Array
Return the list of options in a select list identified by its :name attribute.
-
#get_selected_options_by_id(browser, what) ⇒ Array
(also: #get_selected_option_by_id)
Return the list of selected options in a select list identified by its :id attribute.
-
#get_selected_options_by_name(browser, what) ⇒ Array
(also: #get_selected_option_by_name)
Return the list of selected options in a select list identified by its :name attribute.
-
#get_span_by_id(browser, what, desc = '') ⇒ Water::Span
Return a reference to a span element identified by its :id attribute.
-
#get_table(browser, how, what, desc = '') ⇒ Watir::Table
Return a reference to a table element identified by its attribute how containing what.
-
#get_table_by_id(browser, what, desc = '') ⇒ Watir::Table
Return a reference to a table element identified by its :id attribute.
-
#get_table_by_index(browser, what, desc = '') ⇒ Watir::Table
Return a reference to a table element identified by its :index within browser.
-
#get_table_by_text(browser, what) ⇒ Watir::Table
Return a reference to a table element identified by its :text attribute.
Wait collapse
-
#wait_for_exists(how_long, what_for) ⇒ Object
Wait up to how_long seconds for DOM element what_for to exist in the page.
-
#wait_until_by_link_text(browser, what, desc = '') ⇒ Boolean
Wait until link, identified by attribute :text with value what exists on the page.
-
#wait_until_by_radio_value(browser, what, desc = '') ⇒ Boolean
Wait until radio button, identified by attribute :value with value what exists on the page.
Instance Method Details
#check_element_is_disabled(browser, element, how, what, desc = '') ⇒ Object
982 983 984 |
# File 'lib/awetestlib/regression/legacy.rb', line 982 def check_element_is_disabled(browser, element, how, what, desc = '') disabled?(browser, element, how, what, desc) end |
#checkbox_is_disabled?(browser, what, desc = '') ⇒ Boolean Also known as: validate_check_disabled
Returns True if the answer to the assertion expressed in the called method name is yes.
905 906 907 |
# File 'lib/awetestlib/regression/legacy.rb', line 905 def checkbox_is_disabled?(browser, what, desc = '') disabled?(browser, :checkbox, :id, what, desc) end |
#checkbox_is_enabled?(browser, what, desc = '') ⇒ Boolean Also known as: validate_check_enabled
Returns True if the answer to the assertion expressed in the called method name is yes.
897 898 899 |
# File 'lib/awetestlib/regression/legacy.rb', line 897 def checkbox_is_enabled?(browser, what, desc = '') enabled?(browser, :checkbox, :id, what, desc) end |
#checkbox_not_checked?(browser, what, desc) ⇒ Boolean Also known as: validate_not_check
Returns True if the answer to the assertion expressed in the called method name is yes.
919 920 921 |
# File 'lib/awetestlib/regression/legacy.rb', line 919 def checkbox_not_checked?(browser, what, desc) not_checked?(browser, :id, what, desc) end |
#checked_by_id?(browser, what, desc = '') ⇒ Boolean Also known as: validate_check, checkbox_is_checked?
Returns True if the answer to the assertion expressed in the called method name is yes.
888 889 890 |
# File 'lib/awetestlib/regression/legacy.rb', line 888 def checked_by_id?(browser, what, desc = '') checked?(browser, :id, what, desc) end |
#clear_checkbox(browser, how, what, value = nil, desc = '') ⇒ Boolean
Clear (uncheck) checkbox identified by the attribute specified in how with value what. It’s :value attribute can also be used when needed by specifying value.
685 686 687 |
# File 'lib/awetestlib/regression/legacy.rb', line 685 def clear_checkbox(browser, how, what, value = nil, desc = '') clear(browser, :checkbox, how, what, value, desc) end |
#clear_checkbox_by_id(browser, strg, value = nil, desc = '') ⇒ Boolean
Clear (uncheck) checkbox identified by its :id attribute with value what. It’s :value attribute can also be used when needed by specifying value.
704 705 706 |
# File 'lib/awetestlib/regression/legacy.rb', line 704 def clear_checkbox_by_id(browser, strg, value = nil, desc = '') clear_checkbox(browser, :id, strg, desc) end |
#clear_checkbox_by_name(browser, what, value = nil, desc = '') ⇒ Boolean
Clear (uncheck) checkbox identified by its :name attribute with value what. It’s :value attribute can also be used when needed by specifying value.
696 697 698 |
# File 'lib/awetestlib/regression/legacy.rb', line 696 def clear_checkbox_by_name(browser, what, value = nil, desc = '') clear(browser, :checkbox, :name, what, value, desc) end |
#clear_radio(browser, how, what, value = nil, desc = '') ⇒ Boolean
Clear (unset) radio button identified by the attribute specified in how with value what. It’s :value attribute can also be used when needed by specifying value. This clears the specified radio without setting any other radio buttons on.
719 720 721 |
# File 'lib/awetestlib/regression/legacy.rb', line 719 def clear_radio(browser, how, what, value = nil, desc = '') clear(browser, :radio, how, what, value, desc) end |
#click_button_by_class(browser, what, desc = '') ⇒ Boolean
Click a button element identified by the value of its :class attribute. A button is an HTML element with tag ‘input’ and type ‘submit’ or ‘button’.
59 60 61 |
# File 'lib/awetestlib/regression/legacy.rb', line 59 def (browser, what, desc = '') click(browser, :button, :class, what, desc) end |
#click_button_by_id(browser, what, desc = '') ⇒ Boolean
Click a button element identified by the value of its :id attribute. A button is an HTML element with tag ‘input’ and type ‘submit’ or ‘button’.
15 16 17 |
# File 'lib/awetestlib/regression/legacy.rb', line 15 def (browser, what, desc = '') click(browser, :button, :id, what, desc) end |
#click_button_by_index(browser, what, desc = '') ⇒ Boolean
Click a button element identified by the value of its index within the container referred to by browser.
38 39 40 |
# File 'lib/awetestlib/regression/legacy.rb', line 38 def (browser, what, desc = '') click(browser, :button, :index, what, desc) end |
#click_button_by_name(browser, what, desc = '') ⇒ Boolean
Click a button element identified by the value of its :name attribute. A button is an HTML element with tag ‘input’ and type ‘submit’ or ‘button’.
45 46 47 |
# File 'lib/awetestlib/regression/legacy.rb', line 45 def (browser, what, desc = '') click(browser, :button, :name, what, desc) end |
#click_button_by_text(browser, what, desc = '') ⇒ Boolean
Click a button element identified by the value of its :text attribute. A button is an HTML element with tag ‘input’ and type ‘submit’ or ‘button’.
52 53 54 |
# File 'lib/awetestlib/regression/legacy.rb', line 52 def (browser, what, desc = '') click(browser, :button, :text, what, desc) end |
#click_button_by_title(browser, what, desc = '') ⇒ Boolean
Click a button element identified by the value of its :title attribute. A button is an HTML element with tag ‘input’ and type ‘submit’ or ‘button’.
73 74 75 |
# File 'lib/awetestlib/regression/legacy.rb', line 73 def (browser, what, desc = '') click(browser, :button, :title, what, desc) end |
#click_button_by_value(browser, what, desc = '') ⇒ Boolean
Click a button element identified by the value of its :value attribute. A button is an HTML element with tag ‘input’ and type ‘submit’ or ‘button’.
66 67 68 |
# File 'lib/awetestlib/regression/legacy.rb', line 66 def (browser, what, desc = '') click(browser, :button, :value, what, desc) end |
#click_button_by_xpath_and_id(browser, what, desc = '') ⇒ Boolean Also known as:
Normally used only when the element is not located by other methods.
Click a button element identified by the value of its :id attribute using the xpath functionality in Watir. A button is an HTML element with tag ‘input’ and type ‘submit’ or ‘button’.
293 294 295 |
# File 'lib/awetestlib/regression/legacy.rb', line 293 def (browser, what, desc = '') click(browser, :button, :xpath, "//a[@id = '#{what}']", desc) end |
#click_button_no_wait_by_class(browser, what, desc = '') ⇒ Boolean Also known as:
Click a button element identified by the value of its :class attribute and do not wait for the browser to reach ready state.
199 200 201 |
# File 'lib/awetestlib/regression/legacy.rb', line 199 def (browser, what, desc = '') click_no_wait(browser, :button, :class, what, desc) end |
#click_button_no_wait_by_id(browser, what, desc = '') ⇒ Boolean Also known as:
Click a button element identified by the value of its :id attribute and do not wait for the browser to reach ready state.
181 182 183 |
# File 'lib/awetestlib/regression/legacy.rb', line 181 def (browser, what, desc = '') click_no_wait(browser, :button, :id, what, desc) end |
#click_button_no_wait_by_name(browser, what, desc = '') ⇒ Boolean
Click a button element identified by the value of its :name attribute and do not wait for the browser to reach ready state.
191 192 193 |
# File 'lib/awetestlib/regression/legacy.rb', line 191 def (browser, what, desc = '') click_no_wait(browser, :button, :name, what, desc) end |
#click_button_no_wait_by_text(browser, what, desc = '') ⇒ Boolean
Click a button element identified by the value in its text (innerHTML) and do not wait for the browser to reach ready state.
232 233 234 |
# File 'lib/awetestlib/regression/legacy.rb', line 232 def (browser, what, desc = '') click_no_wait(browser, :button, :text, what, desc) end |
#click_button_no_wait_by_value(browser, what, desc = '') ⇒ Boolean
Click a button element identified by the value of its :value attribute and do not wait for the browser to reach ready state.
240 241 242 |
# File 'lib/awetestlib/regression/legacy.rb', line 240 def (browser, what, desc = '') click_no_wait(browser, :button, :value, what, desc) end |
#click_file_field_by_id(browser, what, desc = '') ⇒ Boolean
Click a file_field element identified by the value of its :id attribute.
98 99 100 |
# File 'lib/awetestlib/regression/legacy.rb', line 98 def click_file_field_by_id(browser, what, desc = '') click(browser, :file_field, :id, what, desc) end |
#click_img_by_alt(browser, what, desc = '') ⇒ Boolean
Click an image element identified by the value of its :id attribute.
105 106 107 |
# File 'lib/awetestlib/regression/legacy.rb', line 105 def click_img_by_alt(browser, what, desc = '') click(browser, :image, :alt, what, desc) end |
#click_img_by_src(browser, what, desc = '') ⇒ Boolean
Click an image element identified by the value of its :src attribute. Take care to escape characters in the source url that are reserved by Regexp.
120 121 122 |
# File 'lib/awetestlib/regression/legacy.rb', line 120 def click_img_by_src(browser, what, desc = '') click(browser, :image, :src, what, desc) end |
#click_img_by_title(browser, what, desc = '') ⇒ Boolean
Click an image element identified by the value of its :title attribute.
112 113 114 |
# File 'lib/awetestlib/regression/legacy.rb', line 112 def click_img_by_title(browser, what, desc = '') click(browser, :image, :title, what, desc) end |
#click_img_by_xpath_and_name(browser, what, desc = '') ⇒ Boolean Also known as: click_img_by_xpath, click_image_by_xpath, click_image_by_xpath_and_name
Normally used only when the element is not located by other methods.
Click an image element identified by the value of its :name attribute using the xpath functionality in Watir.
313 314 315 |
# File 'lib/awetestlib/regression/legacy.rb', line 313 def click_img_by_xpath_and_name(browser, what, desc = '') click(browser, :image, :xpath, "//a[@id = '#{what}']", desc) end |
#click_img_no_wait_by_alt(browser, what, desc = '') ⇒ Boolean Also known as: click_img_by_alt_no_wait
Click an image element identified by the value of its :alt attribute and do not wait for the browser to reach ready state.
222 223 224 |
# File 'lib/awetestlib/regression/legacy.rb', line 222 def click_img_no_wait_by_alt(browser, what, desc = '') click_no_wait(browser, :image, :alt, what, desc) end |
#click_js(browser, element, how, what, desc = '') ⇒ Object
124 125 126 |
# File 'lib/awetestlib/regression/legacy.rb', line 124 def click_js(browser, element, how, what, desc = '') click(browser, element, how, what, desc) end |
#click_link_by_class(browser, what, desc = '') ⇒ Boolean Also known as: click_class
Click a link element identified by the value of its :class attribute.
149 150 151 |
# File 'lib/awetestlib/regression/legacy.rb', line 149 def click_link_by_class(browser, what, desc = '') click(browser, :link, :class, what, desc) end |
#click_link_by_href(browser, what, desc = '') ⇒ Boolean Also known as: click_href
Click a link element identified by the value of its :href attribute. Take care to escape characters in the url that are reserved by Regexp.
29 30 31 |
# File 'lib/awetestlib/regression/legacy.rb', line 29 def click_link_by_href(browser, what, desc = '') click(browser, :link, :href, what, desc) end |
#click_link_by_id(browser, what, desc = '') ⇒ Boolean Also known as: click_id
Click a link element identified by the value of its :id attribute.
80 81 82 |
# File 'lib/awetestlib/regression/legacy.rb', line 80 def click_link_by_id(browser, what, desc = '') click(browser, :link, :id, what, desc) end |
#click_link_by_index(browser, what, desc = '') ⇒ Boolean
Click a button element identified by the value of its index within the container referred to by browser.
22 23 24 |
# File 'lib/awetestlib/regression/legacy.rb', line 22 def click_link_by_index(browser, what, desc = '') click(browser, :link, :index, what, desc) end |
#click_link_by_name(browser, what, desc = '') ⇒ Boolean Also known as: click_name
Click a link element identified by the value of its :name attribute.
89 90 91 |
# File 'lib/awetestlib/regression/legacy.rb', line 89 def click_link_by_name(browser, what, desc = '') click(browser, :link, :name, what, desc) end |
#click_link_by_name_no_wait(browser, what, desc = '') ⇒ Boolean Also known as: click_no_wait_name, click_name_no_wait
Click a button element identified by the value of its :name attribute and do not wait for the browser to reach ready state.
248 249 250 |
# File 'lib/awetestlib/regression/legacy.rb', line 248 def click_link_by_name_no_wait(browser, what, desc = '') click_no_wait(browser, :link, :name, what, desc) end |
#click_link_by_text(browser, what, desc = '') ⇒ Boolean Also known as: click_link, click_text,
Click a link element identified by the value in its text (innerHTML).
138 139 140 |
# File 'lib/awetestlib/regression/legacy.rb', line 138 def click_link_by_text(browser, what, desc = '') click(browser, :link, :text, what, desc) end |
#click_link_by_text_no_wait(browser, what, desc = '') ⇒ Boolean Also known as: click_no_wait_text, click_text_no_wait
Click a link element identified by the value in its text (innerHTML) and do not wait for the browser to reach ready state.
259 260 261 |
# File 'lib/awetestlib/regression/legacy.rb', line 259 def click_link_by_text_no_wait(browser, what, desc = '') click_no_wait(browser, :link, :text, what, desc) end |
#click_link_by_title(browser, what, desc = '') ⇒ Boolean Also known as: click_title
Click a link element identified by the value of its :title attribute.
167 168 169 |
# File 'lib/awetestlib/regression/legacy.rb', line 167 def click_link_by_title(browser, what, desc = '') click(browser, :link, :title, what, desc) end |
#click_link_by_value(browser, what, desc = '') ⇒ Boolean
Click a link element identified by the value of its :value attribute.
131 132 133 |
# File 'lib/awetestlib/regression/legacy.rb', line 131 def click_link_by_value(browser, what, desc = '') click(browser, :link, :value, what, desc) end |
#click_link_by_xpath_and_id(browser, what, desc = '') ⇒ Boolean Also known as: click_link_by_xpath
Normally used only when the element is not located by other methods.
Click a link element identified by the value of its :id attribute using the xpath functionality in Watir.
303 304 305 |
# File 'lib/awetestlib/regression/legacy.rb', line 303 def click_link_by_xpath_and_id(browser, what, desc = '') click(browser, :link, :xpath, "//a[@id = '#{what}']", desc) end |
#click_link_no_wait_by_href(browser, what, desc = '') ⇒ Boolean Also known as: click_href_no_wait
Click a link element identified by the value of its :href attribute and do not wait for the browser to reach ready state. Take care to escape characters in the url that are reserved by Regexp.
278 279 280 |
# File 'lib/awetestlib/regression/legacy.rb', line 278 def click_link_no_wait_by_href(browser, what, desc = '') click_no_wait(browser, :link, :href, what, desc) end |
#click_link_no_wait_by_id(browser, what, desc = '') ⇒ Boolean Also known as: click_no_wait_id, click_no_wait_by_id, click_id_no_wait, click_no_wait_link_by_id
Click a link element identified by the value of its :id attribute and do not wait for the browser to reach ready state.
209 210 211 |
# File 'lib/awetestlib/regression/legacy.rb', line 209 def click_link_no_wait_by_id(browser, what, desc = '') click_no_wait(browser, :link, :id, what, desc) end |
#click_span_by_text(browser, what, desc = '') ⇒ Boolean Also known as: click_span_with_text
Click a span element identified by the value in its text (innerHTML).
158 159 160 |
# File 'lib/awetestlib/regression/legacy.rb', line 158 def click_span_by_text(browser, what, desc = '') click(browser, :span, :text, what, desc) end |
#click_table_row_with_text_by_id(browser, what, text, desc = '', column = nil) ⇒ Boolean
Click the first row which contains a particular string in a table identified by the value in its :id attribute.
If not supplied all columns will be checked.
335 336 337 |
# File 'lib/awetestlib/regression/legacy.rb', line 335 def click_table_row_with_text_by_id(browser, what, text, desc = '', column = nil) click_table_row_with_text(browser, :id, what, text, desc, column) end |
#click_table_row_with_text_by_index(browser, what, text, desc = '', column = nil) ⇒ Boolean
Click the first row which contains a particular string in a table identified by its index in the array of tables contained in browser. A specific column in the table can also be specified.
346 347 348 |
# File 'lib/awetestlib/regression/legacy.rb', line 346 def click_table_row_with_text_by_index(browser, what, text, desc = '', column = nil) click_table_row_with_text(browser, :id, what, text, desc, column) end |
#click_title_no_wait(browser, what, desc = '') ⇒ Boolean
Click a link element identified by the value of its :title attribute and do not wait for the browser to reach ready state.
270 271 272 |
# File 'lib/awetestlib/regression/legacy.rb', line 270 def click_title_no_wait(browser, what, desc = '') click_no_wait(browser, :link, :title, what, desc) end |
#double_click_table_row_with_text_by_id(browser, what, text, desc = '', column = nil) ⇒ Boolean
Double click the first row which contains a particular string in a table identified by the value in its :id attribute. A specific column in the table can also be specified.
356 357 358 |
# File 'lib/awetestlib/regression/legacy.rb', line 356 def double_click_table_row_with_text_by_id(browser, what, text, desc = '', column = nil) double_click_table_row_with_text(browser, :id, what, text, desc, column) end |
#double_click_table_row_with_text_by_index(browser, what, text, desc = '', column = nil) ⇒ Boolean
Double click the first row which contains a particular string in a table identified by its index in the array of tables contained in browser. A specific column in the table can also be specified.
366 367 368 |
# File 'lib/awetestlib/regression/legacy.rb', line 366 def double_click_table_row_with_text_by_index(browser, what, text, desc = '', column = nil) double_click_table_row_with_text(browser, :index, what, text, desc, column) end |
#fire_event_on_image_by_src(browser, what, event, desc = '') ⇒ Boolean Also known as: fire_event_src, fire_event_image_by_src
Fire an event on a image element identified by the value in its :src attribute. Take care to escape characters in the source url that are reserved by Regexp.
771 772 773 |
# File 'lib/awetestlib/regression/legacy.rb', line 771 def fire_event_on_image_by_src(browser, what, event, desc = '') fire_event(browser, :img, :src, what, event, desc) end |
#fire_event_on_link_by_id(browser, what, event, desc = '') ⇒ Boolean Also known as: fire_event_id, fire_event_by_id
Fire an event on a link element identified by the value in its :id attribute.
759 760 761 |
# File 'lib/awetestlib/regression/legacy.rb', line 759 def fire_event_on_link_by_id(browser, what, event, desc = '') fire_event(browser, :link, :id, what, event, desc) end |
#fire_event_on_link_by_text(browser, what, event, desc = '') ⇒ Boolean Also known as: fire_event_text, fire_event_by_text
Fire an event on a link element identified by the value in its text (innerHTML)
741 742 743 |
# File 'lib/awetestlib/regression/legacy.rb', line 741 def fire_event_on_link_by_text(browser, what, event, desc = '') fire_event(browser, :link, :text, what, event, desc) end |
#get_div_by_class(browser, what, desc = '', dbg = false) ⇒ Water::Div
Return a reference to a div element identified by its :class attribute.
1072 1073 1074 |
# File 'lib/awetestlib/regression/legacy.rb', line 1072 def get_div_by_class(browser, what, desc = '', dbg = false) get_div(browser, :class, what, desc, dbg) end |
#get_div_by_id(browser, what, desc = '', dbg = false) ⇒ Water::Div
Return a reference to a div element identified by its :id attribute.
1065 1066 1067 |
# File 'lib/awetestlib/regression/legacy.rb', line 1065 def get_div_by_id(browser, what, desc = '', dbg = false) get_div(browser, :id, what, desc, dbg) end |
#get_div_by_text(browser, what, desc = '', dbg = false) ⇒ Water::Div
Return a reference to a div element identified by its :text attribute.
1079 1080 1081 |
# File 'lib/awetestlib/regression/legacy.rb', line 1079 def get_div_by_text(browser, what, desc = '', dbg = false) get_div(browser, :text, what, desc, dbg) end |
#get_form_by_id(browser, what, desc = '') ⇒ Water::Form
Return a reference to a form element identified by its :id attribute.
1086 1087 1088 |
# File 'lib/awetestlib/regression/legacy.rb', line 1086 def get_form_by_id(browser, what, desc = '') get_form(browser, :id, what, desc) end |
#get_frame_by_id(browser, what, desc = '') ⇒ Water::Frame
Return a reference to a frame element identified by its :id attribute.
1093 1094 1095 |
# File 'lib/awetestlib/regression/legacy.rb', line 1093 def get_frame_by_id(browser, what, desc = '') get_frame(browser, :id, what, desc) end |
#get_frame_by_index(browser, what, desc = '') ⇒ Water::Frame
Return a reference to a frame element identified by its :index within browser.
1100 1101 1102 |
# File 'lib/awetestlib/regression/legacy.rb', line 1100 def get_frame_by_index(browser, what, desc = '') get_frame(browser, :index, what, desc) end |
#get_frame_by_name(browser, what, desc = '') ⇒ Water::Frame
Return a reference to a frame element identified by its :name attribute.
1107 1108 1109 |
# File 'lib/awetestlib/regression/legacy.rb', line 1107 def get_frame_by_name(browser, what, desc = '') get_frame(browser, :name, what, desc) end |
#get_select_options_by_id(browser, what, dbg = false) ⇒ Array
Return the list of options in a select list identified by its :id attribute.
1029 1030 1031 |
# File 'lib/awetestlib/regression/legacy.rb', line 1029 def (browser, what, dbg = false) (browser, :id, what, dbg) end |
#get_select_options_by_name(browser, what, dbg = false) ⇒ Array
Return the list of options in a select list identified by its :name attribute.
1036 1037 1038 |
# File 'lib/awetestlib/regression/legacy.rb', line 1036 def (browser, what, dbg = false) (browser, :name, what, dbg) end |
#get_selected_options_by_id(browser, what) ⇒ Array Also known as: get_selected_option_by_id
Return the list of selected options in a select list identified by its :id attribute.
1044 1045 1046 |
# File 'lib/awetestlib/regression/legacy.rb', line 1044 def (browser, what) (browser, :id, what) end |
#get_selected_options_by_name(browser, what) ⇒ Array Also known as: get_selected_option_by_name
Return the list of selected options in a select list identified by its :name attribute.
1053 1054 1055 |
# File 'lib/awetestlib/regression/legacy.rb', line 1053 def (browser, what) (browser, :name, what) end |
#get_span_by_id(browser, what, desc = '') ⇒ Water::Span
Return a reference to a span element identified by its :id attribute.
1114 1115 1116 |
# File 'lib/awetestlib/regression/legacy.rb', line 1114 def get_span_by_id(browser, what, desc = '') get_span(browser, :id, what, desc) end |
#get_table(browser, how, what, desc = '') ⇒ Watir::Table
Return a reference to a table element identified by its attribute how containing what.
1126 1127 1128 |
# File 'lib/awetestlib/regression/legacy.rb', line 1126 def get_table(browser, how, what, desc = '') get_element(browser, :table, how, what, nil, desc) end |
#get_table_by_id(browser, what, desc = '') ⇒ Watir::Table
Return a reference to a table element identified by its :id attribute.
1133 1134 1135 |
# File 'lib/awetestlib/regression/legacy.rb', line 1133 def get_table_by_id(browser, what, desc = '') get_element(browser, :table, :id, what, nil, desc) end |
#get_table_by_index(browser, what, desc = '') ⇒ Watir::Table
Return a reference to a table element identified by its :index within browser.
1140 1141 1142 |
# File 'lib/awetestlib/regression/legacy.rb', line 1140 def get_table_by_index(browser, what, desc = '') get_element(browser, :table, :index, what, nil, desc) end |
#get_table_by_text(browser, what) ⇒ Watir::Table
Return a reference to a table element identified by its :text attribute.
1147 1148 1149 |
# File 'lib/awetestlib/regression/legacy.rb', line 1147 def get_table_by_text(browser, what) get_element(browser, :table, :text, what, nil, desc) end |
#link_disabled?(browser, what, desc = '') ⇒ Boolean Also known as: validate_link_not_enabled
Verify that div identified by :text is disabled.
976 977 978 |
# File 'lib/awetestlib/regression/legacy.rb', line 976 def link_disabled?(browser, what, desc = '') disabled?(browser, :link, :text, what, desc) end |
#link_enabled?(browser, what, desc = '') ⇒ Boolean Also known as: validate_link_enabled, check_link_enabled
Verify that div click_button_by_id by :text is enabled.
966 967 968 |
# File 'lib/awetestlib/regression/legacy.rb', line 966 def link_enabled?(browser, what, desc = '') enabled?(browser, :link, :text, what, desc) end |
#link_not_exist?(browser, what, desc = '') ⇒ Boolean Also known as: validate_link_not_exist
Verify that link identified by :text does not exist.
943 944 945 |
# File 'lib/awetestlib/regression/legacy.rb', line 943 def link_not_exist?(browser, what, desc = '') does_not_exist?(browser, :link, :text, what, nil, desc) end |
#radio_is_set?(browser, what, desc = '') ⇒ Boolean Also known as: validate_radioset, validate_radio_set
Returns True if the answer to the assertion expressed in the called method name is yes.
873 874 875 |
# File 'lib/awetestlib/regression/legacy.rb', line 873 def radio_is_set?(browser, what, desc = '') set?(browser, :id, what, desc) end |
#select_option_by_class_and_option_text(browser, what, option, desc = '') ⇒ Boolean
Select option from select list (dropdown) identified by the value in its :class attribute. Option is selected by its :text attribute.
410 411 412 |
# File 'lib/awetestlib/regression/legacy.rb', line 410 def select_option_by_class_and_option_text(browser, what, option, desc = '') select_option(browser, :class, what, :text, option, desc) end |
#select_option_by_id_and_index(browser, what, index, desc = '') ⇒ Boolean
Select option from select list (dropdown) identified by the value in its :id attribute. Option is selected by its index withing the select list’s array of options.
435 436 437 |
# File 'lib/awetestlib/regression/legacy.rb', line 435 def select_option_by_id_and_index(browser, what, index, desc = '') select_option(browser, :id, what, :index, index, desc) end |
#select_option_by_id_and_option_text(browser, what, option, nofail = false, desc = '') ⇒ Boolean Also known as: select_option_by_id, select_option_by_id_and_text
Select option from select list (dropdown) identified by the value in its :id attribute. Option is identified by which and value
381 382 383 |
# File 'lib/awetestlib/regression/legacy.rb', line 381 def select_option_by_id_and_option_text(browser, what, option, nofail = false, desc = '') select_option(browser, :id, what, :text, option, desc, nofail) end |
#select_option_by_id_and_option_value(browser, what, option, desc = '') ⇒ Boolean
Select option from select list (dropdown) identified by the value in its :id attribute. Option is selected by its :value attribute.
424 425 426 |
# File 'lib/awetestlib/regression/legacy.rb', line 424 def select_option_by_id_and_option_value(browser, what, option, desc = '') select_option(browser, :id, what, :value, option, desc) end |
#select_option_by_name_and_index(browser, what, option, desc = '') ⇒ Boolean
Select option from select list (dropdown) identified by the value in its :name attribute. Option is selected by its :index attribute.
442 443 444 |
# File 'lib/awetestlib/regression/legacy.rb', line 442 def select_option_by_name_and_index(browser, what, option, desc = '') select_option(browser, :name, what, :index, option, desc) end |
#select_option_by_name_and_option_text(browser, what, option, desc = '') ⇒ Boolean Also known as: select_option_by_name
Select option from select list (dropdown) identified by the value in its :name attribute. Option is selected by its :text attribute.
394 395 396 |
# File 'lib/awetestlib/regression/legacy.rb', line 394 def select_option_by_name_and_option_text(browser, what, option, desc = '') select_option(browser, :name, what, :text, option, desc) end |
#select_option_by_name_and_option_value(browser, what, option, desc = '') ⇒ Boolean
Select option from select list (dropdown) identified by the value in its :name attribute. Option is selected by its :value attribute.
417 418 419 |
# File 'lib/awetestlib/regression/legacy.rb', line 417 def select_option_by_name_and_option_value(browser, what, option, desc = '') select_option(browser, :name, what, :value, option, desc) end |
#select_option_by_title_and_option_text(browser, what, option, desc = '') ⇒ Boolean
Select option from select list (dropdown) identified by the value in its :name attribute. Option is selected by its :text attribute.
403 404 405 |
# File 'lib/awetestlib/regression/legacy.rb', line 403 def select_option_by_title_and_option_text(browser, what, option, desc = '') select_option(browser, :title, what, :text, option, desc) end |
#select_option_by_xpath_and_index(browser, what, option, desc = '') ⇒ Boolean
Select option from select list (dropdown) identified by the xpath command supplied in what. Option is selected by its :index attribute.
449 450 451 |
# File 'lib/awetestlib/regression/legacy.rb', line 449 def select_option_by_xpath_and_index(browser, what, option, desc = '') select_option(browser, :xpath, what, :index, option, desc) end |
#set_checkbox(browser, how, what, value = nil, desc = '') ⇒ Boolean
Set checkbox as checked. Checkbox is identified by the attribute specified in how with value what. It’s :value attribute can also be used when needed by specifying value.
467 468 469 |
# File 'lib/awetestlib/regression/legacy.rb', line 467 def set_checkbox(browser, how, what, value = nil, desc = '') set(browser, :checkbox, how, what, value, desc) end |
#set_checkbox_by_class(browser, what, value = nil, desc = '') ⇒ Boolean
Set checkbox as checked identified by its :class attribute with the value in what. It’s :value attribute can also be used when needed by specifying value.
478 479 480 |
# File 'lib/awetestlib/regression/legacy.rb', line 478 def set_checkbox_by_class(browser, what, value = nil, desc = '') set(browser, :checkbox, :class, what, value, desc) end |
#set_checkbox_by_id(browser, what, value = nil, desc = '') ⇒ Boolean
Set checkbox as checked identified by its :class attribute with the value in what. It’s :value attribute can also be used when needed by specifying value.
486 487 488 |
# File 'lib/awetestlib/regression/legacy.rb', line 486 def set_checkbox_by_id(browser, what, value = nil, desc = '') set(browser, :checkbox, :id, what, value, desc) end |
#set_checkbox_by_name(browser, what, value = nil, desc = '') ⇒ Boolean
Set checkbox as checked identified by its :name attribute with the value in what. It’s :value attribute can also be used when needed by specifying value.
494 495 496 |
# File 'lib/awetestlib/regression/legacy.rb', line 494 def set_checkbox_by_name(browser, what, value = nil, desc = '') set(browser, :checkbox, :name, what, value, desc) end |
#set_checkbox_by_title(browser, what, value = nil, desc = '') ⇒ Boolean
Set checkbox as checked identified by its :title attribute with the value in what. It’s :value attribute can also be used when needed by specifying value.
502 503 504 |
# File 'lib/awetestlib/regression/legacy.rb', line 502 def set_checkbox_by_title(browser, what, value = nil, desc = '') set(browser, :checkbox, :title, what, value, desc) end |
#set_checkbox_by_value(browser, what, desc = '') ⇒ Boolean
Set checkbox as checked identified by its :value attribute with the value in what.
511 512 513 |
# File 'lib/awetestlib/regression/legacy.rb', line 511 def set_checkbox_by_value(browser, what, desc = '') set(browser, :checkbox, :value, what, nil, desc) end |
#set_file_field_by_id(browser, what, filespec, desc = '') ⇒ Boolean
Set file field element, identified by its :id attribute with the value in what.
627 628 629 |
# File 'lib/awetestlib/regression/legacy.rb', line 627 def set_file_field_by_id(browser, what, filespec, desc = '') set_file_field(browser, :id, what, filespec, desc) end |
#set_file_field_by_name(browser, what, filespec, desc = '') ⇒ Boolean
Set file field element, identified by its :name attribute with the value in what.
620 621 622 |
# File 'lib/awetestlib/regression/legacy.rb', line 620 def set_file_field_by_name(browser, what, filespec, desc = '') set_file_field(browser, :name, what, filespec, desc) end |
#set_radio(browser, how, what, value = nil, desc = '') ⇒ Boolean
Set radio button as set. Radio is identified by the attribute specified in how with value what. It’s :value attribute can also be used when needed by specifying value.
519 520 521 |
# File 'lib/awetestlib/regression/legacy.rb', line 519 def set_radio(browser, how, what, value = nil, desc = '') set(browser, :radio, how, what, value, desc) end |
#set_radio_by_class(browser, what, value = nil, desc = '') ⇒ Object
Set radio button as set identified by its :class attribute with the value in what. It’s :value attribute can also be used when needed by specifying value.
526 527 528 |
# File 'lib/awetestlib/regression/legacy.rb', line 526 def set_radio_by_class(browser, what, value = nil, desc = '') set(browser, :radio, :class, what, value, desc) end |
#set_radio_by_id(browser, what, value = nil, desc = '') ⇒ Boolean
Set radio button as set identified by its :id attribute with the value in what. It’s :value attribute can also be used when needed by specifying value.
534 535 536 |
# File 'lib/awetestlib/regression/legacy.rb', line 534 def set_radio_by_id(browser, what, value = nil, desc = '') set(browser, :radio, :id, what, value, desc) end |
#set_radio_by_index(browser, index, desc = '') ⇒ Boolean
Set radio button as set identified by its index within the array of radio buttons found in the container specified by browser.
543 544 545 |
# File 'lib/awetestlib/regression/legacy.rb', line 543 def set_radio_by_index(browser, index, desc = '') set(browser, :radio, :index, index, nil, desc) end |
#set_radio_by_name(browser, what, value = nil, desc = '') ⇒ Boolean
Set radio button as set identified by its :name attribute with the value in what. It’s :value attribute can also be used when needed by specifying value.
551 552 553 |
# File 'lib/awetestlib/regression/legacy.rb', line 551 def set_radio_by_name(browser, what, value = nil, desc = '') set(browser, :radio, :name, what, value, desc) end |
#set_radio_by_name_and_index(browser, what, index, desc = '') ⇒ Boolean
Set radio button as set identified by its :name attribute with the value in what and its index within the array of radio buttons with that :name
577 578 579 |
# File 'lib/awetestlib/regression/legacy.rb', line 577 def set_radio_by_name_and_index(browser, what, index, desc = '') set_radio_two_attributes(browser, :name, what, :index, index, desc) end |
#set_radio_by_name_and_text(browser, what, text, desc = '') ⇒ Boolean
Set radio button as set identified by its :name attribute with the value in what and its index within the array of radio buttons with that :name
588 589 590 |
# File 'lib/awetestlib/regression/legacy.rb', line 588 def set_radio_by_name_and_text(browser, what, text, desc = '') set_radio_two_attributes(browser, :name, what, :text, text, desc) end |
#set_radio_by_name_and_value(browser, what, value, desc = '') ⇒ Boolean
Set radio button as set identified by its :name attribute with the value in what and the :value attribute with the value in value.
610 611 612 |
# File 'lib/awetestlib/regression/legacy.rb', line 610 def set_radio_by_name_and_value(browser, what, value, desc = '') set_radio(browser, :name, what, value, desc) end |
#set_radio_by_title(browser, what, value = nil, desc = '') ⇒ Boolean
Set radio button as set identified by its :title attribute with the value in what. It’s :value attribute can also be used when needed by specifying value.
559 560 561 |
# File 'lib/awetestlib/regression/legacy.rb', line 559 def set_radio_by_title(browser, what, value = nil, desc = '') set(browser, :radio, :title, what, value, desc) end |
#set_radio_by_value(browser, what, desc = '') ⇒ Boolean
Set radio button as set identified by its :value attribute with the value in what.
566 567 568 |
# File 'lib/awetestlib/regression/legacy.rb', line 566 def set_radio_by_value(browser, what, desc = '') set(browser, :radio, :value, what, nil, desc) end |
#set_radio_by_value_and_index(browser, value, index, desc = '') ⇒ Boolean
Set radio button as set identified by its :value attribute with the value in what and its index within the array of radio buttons with that :name
599 600 601 |
# File 'lib/awetestlib/regression/legacy.rb', line 599 def set_radio_by_value_and_index(browser, value, index, desc = '') set_radio_two_attributes(browser, :value, value, :index, index, desc) end |
#set_textfield_by_class(browser, what, value, desc = '', skip_value_check = false) ⇒ Object
Set text field as identified by its :class attribute with value in what to the string specified in value. This method validates that the text field has been set to the specified value. The value verification can be turned off by setting skip_value_check to true.
667 668 669 |
# File 'lib/awetestlib/regression/legacy.rb', line 667 def set_textfield_by_class(browser, what, value, desc = '', skip_value_check = false) set_text_field(browser, :class, what, value, desc, skip_value_check) end |
#set_textfield_by_id(browser, what, value, desc = '', skip_value_check = false) ⇒ Boolean
Set text field as identified by its :id attribute with value in what to the string specified in value. This method validates that the text field has been set to the specified value. The value verification can be turned off by setting skip_value_check to true.
650 651 652 |
# File 'lib/awetestlib/regression/legacy.rb', line 650 def set_textfield_by_id(browser, what, value, desc = '', skip_value_check = false) set_text_field(browser, :id, what, value, desc, skip_value_check) end |
#set_textfield_by_name(browser, what, value, desc = '', skip_value_check = false) ⇒ Boolean
Set text field as identified by its :name attribute with value in what to the string specified in value. This method validates that the text field has been set to the specified value. The value verification can be turned off by setting skip_value_check to true. Required if skip_value_check is set to true.
641 642 643 |
# File 'lib/awetestlib/regression/legacy.rb', line 641 def set_textfield_by_name(browser, what, value, desc = '', skip_value_check = false) set_text_field(browser, :name, what, value, desc, skip_value_check) end |
#set_textfield_by_title(browser, what, value, desc = '', skip_value_check = false) ⇒ Boolean
Set text field as identified by its :class attribute with value in what to the string specified in value. This method validates that the text field has been set to the specified value. The value verification can be turned off by setting skip_value_check to true.
659 660 661 |
# File 'lib/awetestlib/regression/legacy.rb', line 659 def set_textfield_by_title(browser, what, value, desc = '', skip_value_check = false) set_text_field(browser, :title, what, value, desc, skip_value_check) end |
#span_contains_text?(browser, how, what, expected, desc = '') ⇒ Boolean Also known as: valid_text_in_span
Returns True if the answer to the assertion expressed in the called method name is yes.
1008 1009 1010 |
# File 'lib/awetestlib/regression/legacy.rb', line 1008 def span_contains_text?(browser, how, what, expected, desc = '') element_contains_text?(browser, :span, how, what, expected, desc) end |
#text_in_span_equals?(browser, how, what, expected, desc = '') ⇒ Boolean
Returns True if the answer to the assertion expressed in the called method name is yes.
1002 1003 1004 |
# File 'lib/awetestlib/regression/legacy.rb', line 1002 def text_in_span_equals?(browser, how, what, expected, desc = '') text_in_element_equals?(browser, :span, how, what, expected, desc) end |
#validate_check_by_class(browser, what, desc) ⇒ Boolean
Returns True if the answer to the assertion expressed in the called method name is yes.
913 914 915 |
# File 'lib/awetestlib/regression/legacy.rb', line 913 def validate_check_by_class(browser, what, desc) checked?(browser, :class, what, desc) end |
#validate_div_not_visible_by_id(browser, what, desc = '') ⇒ Boolean
Verify that div identified by :id is not visible.
959 960 961 |
# File 'lib/awetestlib/regression/legacy.rb', line 959 def validate_div_not_visible_by_id(browser, what, desc = '') not_visible?(browser, :div, :id, what, desc) end |
#validate_div_visible_by_id(browser, what, desc = '') ⇒ Boolean
Verify that div identified by :id is visible.
952 953 954 |
# File 'lib/awetestlib/regression/legacy.rb', line 952 def validate_div_visible_by_id(browser, what, desc = '') visible?(browser, :div, :id, what, desc) end |
#validate_image(browser, what, desc = '', nofail = false) ⇒ Boolean
Returns True if the answer to the assertion expressed in the called method name is yes.
927 928 929 |
# File 'lib/awetestlib/regression/legacy.rb', line 927 def validate_image(browser, what, desc = '', nofail = false) exists?(browser, :image, :src, what, desc) end |
#validate_link_exist(browser, what, desc = '') ⇒ Boolean
Verify that link identified by :text exists.
936 937 938 |
# File 'lib/awetestlib/regression/legacy.rb', line 936 def validate_link_exist(browser, what, desc = '') exists?(browser, :link, :text, what, nil, desc) end |
#validate_list(browser, what, expected, desc = '') ⇒ Boolean
Verify that select list, identified by :id and what contains text and select it if present
989 990 991 |
# File 'lib/awetestlib/regression/legacy.rb', line 989 def validate_list(browser, what, expected, desc = '') validate_list_by_id(browser, what, expected, desc) end |
#validate_no_list(browser, what, expected, desc = '') ⇒ Boolean
Verify select list, identified by :id, does not contain text
996 997 998 |
# File 'lib/awetestlib/regression/legacy.rb', line 996 def validate_no_list(browser, what, expected, desc = '') select_list_does_not_include?(browser, :id, what, expected, desc) end |
#validate_radio_not_set(browser, what, desc = '') ⇒ Boolean Also known as: validate_not_radioset
Returns True if the answer to the assertion expressed in the called method name is yes.
865 866 867 |
# File 'lib/awetestlib/regression/legacy.rb', line 865 def validate_radio_not_set(browser, what, desc = '') not_set?(browser, :id, what, desc) end |
#validate_radioset_by_name(browser, what, desc = '') ⇒ Boolean
Returns True if the answer to the assertion expressed in the called method name is yes.
882 883 884 |
# File 'lib/awetestlib/regression/legacy.rb', line 882 def validate_radioset_by_name(browser, what, desc = '') set?(browser, :name, what, desc) end |
#validate_text_in_span_by_id(browser, what, expected, desc = '') ⇒ Boolean
Returns True if the answer to the assertion expressed in the called method name is yes.
1016 1017 1018 |
# File 'lib/awetestlib/regression/legacy.rb', line 1016 def validate_text_in_span_by_id(browser, what, expected, desc = '') element_contains_text?(browser, :span, :id, what, expected, desc) end |
#validate_textfield_disabled_by_name(browser, what, desc = '') ⇒ Boolean Also known as: disabled_textfield_by_name
Returns True if the answer to the assertion expressed in the called method name is yes.
841 842 843 |
# File 'lib/awetestlib/regression/legacy.rb', line 841 def validate_textfield_disabled_by_name(browser, what, desc = '') disabled?(browser, :text_field, :name, what, desc) end |
#validate_textfield_empty_by_id(browser, what, desc = '') ⇒ Boolean
Returns True if the answer to the assertion expressed in the called method name is yes.
806 807 808 |
# File 'lib/awetestlib/regression/legacy.rb', line 806 def validate_textfield_empty_by_id(browser, what, desc = '') textfield_empty?(browser, :id, what, desc) end |
#validate_textfield_empty_by_name(browser, what, desc = '') ⇒ Boolean
Returns True if the answer to the assertion expressed in the called method name is yes.
800 801 802 |
# File 'lib/awetestlib/regression/legacy.rb', line 800 def validate_textfield_empty_by_name(browser, what, desc = '') textfield_empty?(browser, :name, what, desc) end |
#validate_textfield_empty_by_title(browser, what, desc = '') ⇒ Boolean
Returns True if the answer to the assertion expressed in the called method name is yes.
812 813 814 |
# File 'lib/awetestlib/regression/legacy.rb', line 812 def validate_textfield_empty_by_title(browser, what, desc = '') textfield_empty?(browser, :title, what, desc) end |
#validate_textfield_enabled_by_name(browser, what, desc = '') ⇒ Boolean Also known as: enabled_textfield_by_name
Returns True if the answer to the assertion expressed in the called method name is yes.
849 850 851 |
# File 'lib/awetestlib/regression/legacy.rb', line 849 def validate_textfield_enabled_by_name(browser, what, desc = '') enabled?(browser, :text_field, :name, what, desc) end |
#validate_textfield_not_value_by_id(browser, what, value, desc = '') ⇒ Boolean Also known as: validate_textfield_no_value_by_id
Returns True if the answer to the assertion expressed in the called method name is yes.
792 793 794 |
# File 'lib/awetestlib/regression/legacy.rb', line 792 def validate_textfield_not_value_by_id(browser, what, value, desc = '') textfield_does_not_equal?(browser, :id, what, value, desc) end |
#validate_textfield_not_value_by_name(browser, what, value, desc = '') ⇒ Boolean Also known as: validate_textfield_no_value_by_name
Returns True if the answer to the assertion expressed in the called method name is yes.
784 785 786 |
# File 'lib/awetestlib/regression/legacy.rb', line 784 def validate_textfield_not_value_by_name(browser, what, value, desc = '') textfield_does_not_equal?(browser, :name, what, value, desc) end |
#validate_textfield_not_visible_by_name(browser, what, desc = '') ⇒ Boolean Also known as: visible_no_textfield_by_name
Returns True if the answer to the assertion expressed in the called method name is yes.
857 858 859 |
# File 'lib/awetestlib/regression/legacy.rb', line 857 def validate_textfield_not_visible_by_name(browser, what, desc = '') not_visible?(browser, :text_field, :name, what, desc) end |
#validate_textfield_value_by_id(browser, what, expected, desc = '') ⇒ Boolean
Returns True if the answer to the assertion expressed in the called method name is yes.
827 828 829 |
# File 'lib/awetestlib/regression/legacy.rb', line 827 def validate_textfield_value_by_id(browser, what, expected, desc = '') textfield_equals?(browser, :id, what, expected, desc) end |
#validate_textfield_value_by_name(browser, what, expected, desc = '') ⇒ Boolean
Returns True if the answer to the assertion expressed in the called method name is yes.
821 822 823 |
# File 'lib/awetestlib/regression/legacy.rb', line 821 def validate_textfield_value_by_name(browser, what, expected, desc = '') textfield_equals?(browser, :name, what, expected, desc) end |
#validate_textfield_visible_by_name(browser, what, desc = '') ⇒ Boolean Also known as: visible_textfield_by_name
Returns True if the answer to the assertion expressed in the called method name is yes.
833 834 835 |
# File 'lib/awetestlib/regression/legacy.rb', line 833 def validate_textfield_visible_by_name(browser, what, desc = '') visible?(browser, :text_field, :name, what, desc) end |
#wait_for_exists(how_long, what_for) ⇒ Object
This is a last resort method when other wait or wait until avenues have
Wait up to how_long seconds for DOM element what_for to exist in the page. been exhausted.
1170 1171 1172 |
# File 'lib/awetestlib/regression/legacy.rb', line 1170 def wait_for_exists(how_long, what_for) wait_for(how_long, what_for) end |
#wait_until_by_link_text(browser, what, desc = '') ⇒ Boolean
Wait until link, identified by attribute :text with value what exists on the page. Timeout is the default used by watir (60 seconds)
1178 1179 1180 |
# File 'lib/awetestlib/regression/legacy.rb', line 1178 def wait_until_by_link_text(browser, what, desc = '') wait_until_exists(browser, :link, :text, what, desc) end |
#wait_until_by_radio_value(browser, what, desc = '') ⇒ Boolean
Wait until radio button, identified by attribute :value with value what exists on the page. Timeout is the default used by watir (60 seconds)
1161 1162 1163 |
# File 'lib/awetestlib/regression/legacy.rb', line 1161 def wait_until_by_radio_value(browser, what, desc = '') wait_until_exists(browser, :radio, :value, what, desc) end |