Module: Awetestlib::Regression::Legacy

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 No Wait (UserInput) collapse

Xpath (UserInput) collapse

Tables (UserInput) collapse

Select (UserInput) collapse

Set (UserInput) collapse

Clear (UserInput) collapse

Fire Event (UserInput) collapse

Validations collapse

Find collapse

Wait collapse

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.

Parameters:

  • browser (Watir::Browser, Watir::Container)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    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.

Parameters:

  • browser (Watir::Browser, Watir::Container)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    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.

Parameters:

  • browser (Watir::Browser, Watir::Container)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • desc (String)

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    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.

Parameters:

  • browser (Watir::Browser, Watir::Container)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    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.

Parameters:

  • browser (Watir::Browser)

    A reference to the browser window or container element to be tested.

  • how (Symbol)

    The element attribute used to identify the specific checkbox. Valid values depend on the kind of element. Common values: :text, :id, :title, :name, :class.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • value (String, Regexp) (defaults to: nil)

    A string or a regular expression to be found in the :value attribute of the element.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    True if the Watir or Watir-webdriver function does not throw an exception.



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.

Parameters:

  • browser (Watir::Browser)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • filespec (String)

    The full path and name of the target file.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    True if the Watir or Watir-webdriver function does not throw an exception.



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.

Parameters:

  • browser (Watir::Browser)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • value (String, Regexp) (defaults to: nil)

    A string or a regular expression to be found in the :value attribute of the element.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    True if the Watir or Watir-webdriver function does not throw an exception.



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.

Parameters:

  • browser (Watir::Browser)

    A reference to the browser window or container element to be tested.

  • how (Symbol)

    The element attribute used to identify the specific checkbox. Valid values depend on the kind of element. Common values: :text, :id, :title, :name, :class.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • value (String, Regexp) (defaults to: nil)

    A string or a regular expression to be found in the :value attribute of the element.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    True if the Watir or Watir-webdriver function does not throw an exception.



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’.

Parameters:

  • browser (Watir::Browser, Watir::Container)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    True if the Watir or Watir-webdriver function does not throw an exception.



59
60
61
# File 'lib/awetestlib/regression/legacy.rb', line 59

def click_button_by_class(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’.

Parameters:

  • browser (Watir::Browser, Watir::Container)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    True if the Watir or Watir-webdriver function does not throw an exception.



15
16
17
# File 'lib/awetestlib/regression/legacy.rb', line 15

def click_button_by_id(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.

Parameters:

  • browser (Watir::Browser, Watir::Container)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    True if the Watir or Watir-webdriver function does not throw an exception.



38
39
40
# File 'lib/awetestlib/regression/legacy.rb', line 38

def click_button_by_index(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’.

Parameters:

  • browser (Watir::Browser, Watir::Container)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    True if the Watir or Watir-webdriver function does not throw an exception.



45
46
47
# File 'lib/awetestlib/regression/legacy.rb', line 45

def click_button_by_name(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’.

Parameters:

  • browser (Watir::Browser, Watir::Container)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    True if the Watir or Watir-webdriver function does not throw an exception.



52
53
54
# File 'lib/awetestlib/regression/legacy.rb', line 52

def click_button_by_text(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’.

Parameters:

  • browser (Watir::Browser, Watir::Container)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    True if the Watir or Watir-webdriver function does not throw an exception.



73
74
75
# File 'lib/awetestlib/regression/legacy.rb', line 73

def click_button_by_title(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’.

Parameters:

  • browser (Watir::Browser, Watir::Container)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    True if the Watir or Watir-webdriver function does not throw an exception.



66
67
68
# File 'lib/awetestlib/regression/legacy.rb', line 66

def click_button_by_value(browser, what, desc = '')
  click(browser, :button, :value, what, desc)
end

#click_button_by_xpath_and_id(browser, what, desc = '') ⇒ Boolean Also known as: click_button_by_xpath

Note:

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’.

Parameters:

  • browser (Watir::Browser, Watir::Container)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    True if the Watir or Watir-webdriver function does not throw an exception.



293
294
295
# File 'lib/awetestlib/regression/legacy.rb', line 293

def click_button_by_xpath_and_id(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_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.

Parameters:

  • browser (Watir::Browser, Watir::Container)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    True if the Watir or Watir-webdriver function does not throw an exception.



199
200
201
# File 'lib/awetestlib/regression/legacy.rb', line 199

def click_button_no_wait_by_class(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_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.

Parameters:

  • browser (Watir::Browser, Watir::Container)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    True if the Watir or Watir-webdriver function does not throw an exception.



181
182
183
# File 'lib/awetestlib/regression/legacy.rb', line 181

def click_button_no_wait_by_id(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.

Parameters:

  • browser (Watir::Browser, Watir::Container)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    True if the Watir or Watir-webdriver function does not throw an exception.



191
192
193
# File 'lib/awetestlib/regression/legacy.rb', line 191

def click_button_no_wait_by_name(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.

Parameters:

  • browser (Watir::Browser, Watir::Container)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    True if the Watir or Watir-webdriver function does not throw an exception.



232
233
234
# File 'lib/awetestlib/regression/legacy.rb', line 232

def click_button_no_wait_by_text(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.

Parameters:

  • browser (Watir::Browser, Watir::Container)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    True if the Watir or Watir-webdriver function does not throw an exception.



240
241
242
# File 'lib/awetestlib/regression/legacy.rb', line 240

def click_button_no_wait_by_value(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.

Parameters:

  • browser (Watir::Browser, Watir::Container)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    True if the Watir or Watir-webdriver function does not throw an exception.



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.

Parameters:

  • browser (Watir::Browser, Watir::Container)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    True if the Watir or Watir-webdriver function does not throw an exception.



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.

Parameters:

  • browser (Watir::Browser, Watir::Container)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    True if the Watir or Watir-webdriver function does not throw an exception.



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.

Parameters:

  • browser (Watir::Browser, Watir::Container)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    True if the Watir or Watir-webdriver function does not throw an exception.



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

Note:

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.

Parameters:

  • browser (Watir::Browser, Watir::Container)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    True if the Watir or Watir-webdriver function does not throw an exception.



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[@name = '#{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.

Parameters:

  • browser (Watir::Browser, Watir::Container)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    True if the Watir or Watir-webdriver function does not throw an exception.



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 a link element identified by the value of its :class attribute.

Parameters:

  • browser (Watir::Browser, Watir::Container)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    True if the Watir or Watir-webdriver function does not throw an exception.



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 a link element identified by the value of its :href attribute. Take care to escape characters in the url that are reserved by Regexp.

Parameters:

  • browser (Watir::Browser, Watir::Container)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    True if the Watir or Watir-webdriver function does not throw an exception.



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 a link element identified by the value of its :id attribute.

Parameters:

  • browser (Watir::Browser, Watir::Container)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    True if the Watir or Watir-webdriver function does not throw an exception.



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 a button element identified by the value of its index within the container referred to by browser.

Parameters:

  • browser (Watir::Browser, Watir::Container)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    True if the Watir or Watir-webdriver function does not throw an exception.



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 a link element identified by the value of its :name attribute.

Parameters:

  • browser (Watir::Browser, Watir::Container)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    True if the Watir or Watir-webdriver function does not throw an exception.



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 a button element identified by the value of its :name attribute and do not wait for the browser to reach ready state.

Parameters:

  • browser (Watir::Browser, Watir::Container)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    True if the Watir or Watir-webdriver function does not throw an exception.



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 a link element identified by the value in its text (innerHTML).

Parameters:

  • browser (Watir::Browser, Watir::Container)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    True if the Watir or Watir-webdriver function does not throw an exception.



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 a link element identified by the value in its text (innerHTML) and do not wait for the browser to reach ready state.

Parameters:

  • browser (Watir::Browser, Watir::Container)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    True if the Watir or Watir-webdriver function does not throw an exception.



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 a link element identified by the value of its :title attribute.

Parameters:

  • browser (Watir::Browser, Watir::Container)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    True if the Watir or Watir-webdriver function does not throw an exception.



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 a link element identified by the value of its :value attribute.

Parameters:

  • browser (Watir::Browser, Watir::Container)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    True if the Watir or Watir-webdriver function does not throw an exception.



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

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.

Parameters:

  • browser (Watir::Browser, Watir::Container)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    True if the Watir or Watir-webdriver function does not throw an exception.



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 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.

Parameters:

  • browser (Watir::Browser, Watir::Container)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    True if the Watir or Watir-webdriver function does not throw an exception.



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 a link element identified by the value of its :id attribute and do not wait for the browser to reach ready state.

Parameters:

  • browser (Watir::Browser, Watir::Container)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    True if the Watir or Watir-webdriver function does not throw an exception.



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).

Parameters:

  • browser (Watir::Browser, Watir::Container)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    True if the Watir or Watir-webdriver function does not throw an exception.



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.

Parameters:

  • browser (Watir::Browser)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the how attribute that uniquely identifies the element.

  • text (String)

    Full text string to be found in the table row.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

  • column (Fixnum) (defaults to: nil)

    Integer indicating the column to search for the text string.

Returns:

  • (Boolean)

    True if the Watir or Watir-webdriver function does not throw an exception.



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.

Parameters:

  • browser (Watir::Browser)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the how attribute that uniquely identifies the element.

  • text (String)

    Full text string to be found in the table row.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

  • column (Fixnum) (defaults to: nil)

    Integer indicating the column to search for the text string.

Returns:

  • (Boolean)

    True if the Watir or Watir-webdriver function does not throw an exception.



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.

Parameters:

  • browser (Watir::Browser, Watir::Container)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    True if the Watir or Watir-webdriver function does not throw an exception.



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.

Parameters:

  • browser (Watir::Browser)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the how attribute that uniquely identifies the element.

  • text (String)

    Full text string to be found in the table row.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

  • column (Fixnum) (defaults to: nil)

    Integer indicating the column to search for the text string.

Returns:

  • (Boolean)

    True if the Watir or Watir-webdriver function does not throw an exception.



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.

Parameters:

  • browser (Watir::Browser)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the how attribute that uniquely identifies the element.

  • text (String)

    Full text string to be found in the table row.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

  • column (Fixnum) (defaults to: nil)

    Integer indicating the column to search for the text string.

Returns:

  • (Boolean)

    True if the Watir or Watir-webdriver function does not throw an exception.



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.

Parameters:

  • browser (Watir::Browser)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the how attribute that uniquely identifies the element.

  • event (String)

    A string identifying the event to be fired.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    True if the Watir or Watir-webdriver function does not throw an exception.



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 an event on a link element identified by the value in its :id attribute.

Examples:

# html for a link element:
# <a href="http://pragmaticprogrammer.com/titles/ruby/" id="one" name="book">Pickaxe</a>

fire_event_on_link_by_id(browser, 'one', 'onMouseOver')

Parameters:

  • browser (Watir::Browser)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the how attribute that uniquely identifies the element.

  • event (String)

    A string identifying the event to be fired.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    True if the Watir or Watir-webdriver function does not throw an exception.



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 an event on a link element identified by the value in its text (innerHTML)

Examples:

# html for a link element:
# <a href="http://pragmaticprogrammer.com/titles/ruby/" id="one" name="book">Pickaxe</a>

fire_event_on_link_by_text(browser, 'Pickaxe', 'onMouseOver')

Parameters:

  • browser (Watir::Browser)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the how attribute that uniquely identifies the element.

  • event (String)

    A string identifying the event to be fired.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    True if the Watir or Watir-webdriver function does not throw an exception.



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.

Parameters:

  • browser (Watir::Browser)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the designated attribute that uniquely identifies the element.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

  • dbg (Boolean) (defaults to: false)

    Triggers additional debug logging when set to true.

Returns:

  • (Water::Div)


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.

Parameters:

  • browser (Watir::Browser)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the designated attribute that uniquely identifies the element.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

  • dbg (Boolean) (defaults to: false)

    Triggers additional debug logging when set to true.

Returns:

  • (Water::Div)


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.

Parameters:

  • browser (Watir::Browser)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the designated attribute that uniquely identifies the element.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

  • dbg (Boolean) (defaults to: false)

    Triggers additional debug logging when set to true.

Returns:

  • (Water::Div)


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.

Parameters:

  • browser (Watir::Browser, Watir::Container)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Water::Form)


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.

Parameters:

  • browser (Watir::Browser, Watir::Container)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Water::Frame)


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.

Parameters:

  • browser (Watir::Browser, Watir::Container)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Water::Frame)


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.

Parameters:

  • browser (Watir::Browser, Watir::Container)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Water::Frame)


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.

Parameters:

  • browser (Watir::Browser)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the designated attribute that uniquely identifies the element.

  • dbg (Boolean) (defaults to: false)

    Triggers additional debug logging when set to true.

Returns:

  • (Array)


1029
1030
1031
# File 'lib/awetestlib/regression/legacy.rb', line 1029

def get_select_options_by_id(browser, what, dbg = false)
  get_select_options(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.

Parameters:

  • browser (Watir::Browser)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the designated attribute that uniquely identifies the element.

  • dbg (Boolean) (defaults to: false)

    Triggers additional debug logging when set to true.

Returns:

  • (Array)


1036
1037
1038
# File 'lib/awetestlib/regression/legacy.rb', line 1036

def get_select_options_by_name(browser, what, dbg = false)
  get_select_options(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.

Parameters:

  • browser (Watir::Browser)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the designated attribute that uniquely identifies the element.

Returns:

  • (Array)


1044
1045
1046
# File 'lib/awetestlib/regression/legacy.rb', line 1044

def get_selected_options_by_id(browser, what)
  get_selected_options(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.

Parameters:

  • browser (Watir::Browser)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the designated attribute that uniquely identifies the element.

  • dbg (Boolean)

    Triggers additional debug logging when set to true.

Returns:

  • (Array)


1053
1054
1055
# File 'lib/awetestlib/regression/legacy.rb', line 1053

def get_selected_options_by_name(browser, what)
  get_selected_options(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.

Parameters:

  • browser (Watir::Browser, Watir::Container)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Water::Span)


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.

Parameters:

  • browser (Watir::Browser)

    A reference to the browser window or container element to be tested.

  • how (Symbol)

    The element attribute used to identify the specific element. Valid values depend on the kind of element. Common values: :text, :id, :title, :name, :class, :href (:link only)

  • what (String, Regexp)

    A string or a regular expression to be found in the how attribute that uniquely identifies the element.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Watir::Table)


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.

Parameters:

  • browser (Watir::Browser, Watir::Container)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Watir::Table)


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.

Parameters:

  • browser (Watir::Browser, Watir::Container)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Watir::Table)


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.

Parameters:

  • browser (Watir::Browser)

    A reference to the browser window or container element to be tested.

  • how (Symbol)

    The element attribute used to identify the specific element. Valid values depend on the kind of element. Common values: :text, :id, :title, :name, :class, :href (:link only)

  • what (String, Regexp)

    A string or a regular expression to be found in the how attribute that uniquely identifies the element.

  • desc (String)

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Watir::Table)


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

Verify that div identified by :text is disabled.

Parameters:

  • browser (Watir::Browser, Watir::Container)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    True if the element 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

Verify that div click_button_by_id by :text is enabled.

Parameters:

  • browser (Watir::Browser, Watir::Container)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    True if the element 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

Verify that link identified by :text does not exist.

Parameters:

  • browser (Watir::Browser, Watir::Container)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    True if the element is 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.

Parameters:

  • browser (Watir::Browser, Watir::Container)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    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.

Parameters:

  • browser (Watir::Browser)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • option (String/Rexexp)

    A string or regular expression that will uniquely identify the option to select.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    True if the Watir or Watir-webdriver function does not throw an exception.



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.

Parameters:

  • browser (Watir::Browser)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • index (Fixnum)

    An integer that indicates the index of the element within the array of options.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    True if the Watir or Watir-webdriver function does not throw an exception.



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

Parameters:

  • browser (Watir::Browser)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • option (String/Rexexp)

    A string or regular expression that will uniquely identify the option to select.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

  • nofail (Boolean) (defaults to: false)

    If true do not log a failed message if the option is not found in the select list.

Returns:

  • (Boolean)

    True if the Watir or Watir-webdriver function does not throw an exception.



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.

Parameters:

  • browser (Watir::Browser)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • option (String/Rexexp)

    A string or regular expression that will uniquely identify the option to select.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    True if the Watir or Watir-webdriver function does not throw an exception.



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.

Parameters:

  • browser (Watir::Browser)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • index (Fixnum)

    An integer that indicates the index of the element within the array of options.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    True if the Watir or Watir-webdriver function does not throw an exception.



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.

Parameters:

  • browser (Watir::Browser)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • option (String/Rexexp)

    A string or regular expression that will uniquely identify the option to select.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    True if the Watir or Watir-webdriver function does not throw an exception.



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.

Parameters:

  • browser (Watir::Browser)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • option (String/Rexexp)

    A string or regular expression that will uniquely identify the option to select.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    True if the Watir or Watir-webdriver function does not throw an exception.



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.

Parameters:

  • browser (Watir::Browser)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • option (String/Rexexp)

    A string or regular expression that will uniquely identify the option to select.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    True if the Watir or Watir-webdriver function does not throw an exception.



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.

Parameters:

  • browser (Watir::Browser)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • index (Fixnum)

    An integer that indicates the index of the element within the array of options.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    True if the Watir or Watir-webdriver function does not throw an exception.



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.

Parameters:

  • browser (Watir::Browser)

    A reference to the browser window or container element to be tested.

  • how (Symbol)

    The element attribute used to identify the specific checkbox. Valid values depend on the kind of element. Common values: :text, :id, :title, :name, :class, :href (:link only)

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the checkbox.

  • value (String, Regexp) (defaults to: nil)

    A string or a regular expression to be found in the :value attribute of the checkbox.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    True if the Watir or Watir-webdriver function does not throw an exception.



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.

Parameters:

  • browser (Watir::Browser)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the checkbox.

  • value (String, Regexp) (defaults to: nil)

    A string or a regular expression to be found in the :value attribute of the checkbox.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    True if the Watir or Watir-webdriver function does not throw an exception.



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.

Parameters:

  • browser (Watir::Browser)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the checkbox.

  • value (String, Regexp) (defaults to: nil)

    A string or a regular expression to be found in the :value attribute of the checkbox.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    True if the Watir or Watir-webdriver function does not throw an exception.



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.

Parameters:

  • browser (Watir::Browser)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the checkbox.

  • value (String, Regexp) (defaults to: nil)

    A string or a regular expression to be found in the :value attribute of the checkbox.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    True if the Watir or Watir-webdriver function does not throw an exception.



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.

Parameters:

  • browser (Watir::Browser)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the checkbox.

  • value (String, Regexp) (defaults to: nil)

    A string or a regular expression to be found in the :value attribute of the checkbox.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    True if the Watir or Watir-webdriver function does not throw an exception.



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.

Parameters:

  • browser (Watir::Browser)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the checkbox.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    True if the Watir or Watir-webdriver function does not throw an exception.



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.

Parameters:

  • browser (Watir::Browser)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • filespec (String)

    The full path and name of the target file.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    True if the Watir or Watir-webdriver function does not throw an exception.



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.

Parameters:

  • browser (Watir::Browser)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • filespec (String)

    The full path and name of the target file.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    True if the Watir or Watir-webdriver function does not throw an exception.



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.

Parameters:

  • browser (Watir::Browser)

    A reference to the browser window or container element to be tested.

  • how (Symbol)

    The element attribute used to identify the specific checkbox. Valid values depend on the kind of element. Common values: :text, :id, :title, :name, :class, :href (:link only)

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the checkbox.

  • value (String, Regexp) (defaults to: nil)

    A string or a regular expression to be found in the :value attribute of the checkbox.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    True if the Watir or Watir-webdriver function does not throw an exception.



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.

Parameters:

  • browser (Watir::Browser)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the checkbox.

  • value (String, Regexp) (defaults to: nil)

    A string or a regular expression to be found in the :value attribute of the checkbox.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output



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.

Parameters:

  • browser (Watir::Browser)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the checkbox.

  • value (String, Regexp) (defaults to: nil)

    A string or a regular expression to be found in the :value attribute of the checkbox.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    True if the Watir or Watir-webdriver function does not throw an exception.



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.

Parameters:

  • browser (Watir::Browser)

    A reference to the browser window or container element to be tested.

  • index (Fixnum)

    An integer that indicates the index of the element within browser.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    True if the Watir or Watir-webdriver function does not throw an exception.



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.

Parameters:

  • browser (Watir::Browser)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the checkbox.

  • value (String, Regexp) (defaults to: nil)

    A string or a regular expression to be found in the :value attribute of the checkbox.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    True if the Watir or Watir-webdriver function does not throw an exception.



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

Parameters:

  • browser (Watir::Browser)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the :name attribute that identifies the group of radio buttons.

  • index (Fixnum)

    An integer that indicates the index of the radio button to be set.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    True if the Watir or Watir-webdriver function does not throw an exception.



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

Parameters:

  • browser (Watir::Browser)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the :name attribute that identifies the group of radio buttons.

  • text (String, Regexp)

    A string or a regular expression to be found in the :text attribute that uniquely identifies the the radio button to be set.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    True if the Watir or Watir-webdriver function does not throw an exception.



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.

Parameters:

  • browser (Watir::Browser)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the :name attribute that identifies the group of radio buttons.

  • value (String, Regexp)

    A string or a regular expression to be found in the :value attribute that uniquely identifies the the radio button to be set.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    True if the Watir or Watir-webdriver function does not throw an exception.



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.

Parameters:

  • browser (Watir::Browser)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the checkbox.

  • value (String, Regexp) (defaults to: nil)

    A string or a regular expression to be found in the :value attribute of the checkbox.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    True if the Watir or Watir-webdriver function does not throw an exception.



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.

Parameters:

  • browser (Watir::Browser, Watir::Container)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    True if the Watir or Watir-webdriver function does not throw an exception.



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

Parameters:

  • browser (Watir::Browser)

    A reference to the browser window or container element to be tested.

  • value (String, Regexp)

    A string or a regular expression to be found in the :value attribute that identifies the group of radio buttons.

  • index (Fixnum)

    An integer that indicates the index of the radio button to be set.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    True if the Watir or Watir-webdriver function does not throw an exception.



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.

Parameters:

  • browser (Watir::Browser)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • value (String)

    A string to enter into the text field.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output.

  • skip_value_check (Boolean) (defaults to: false)

    Forces verification of value in text field to pass.



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.

Parameters:

  • browser (Watir::Browser)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • value (String)

    A string to enter into the text field.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output.

  • skip_value_check (Boolean) (defaults to: false)

    Forces verification of value in text field to pass.

Returns:

  • (Boolean)

    True if the Watir or Watir-webdriver function does not throw an exception.



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.

Parameters:

  • browser (Watir::Browser)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • value (String)

    A string to enter into the text field.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output.

  • skip_value_check (Boolean) (defaults to: false)

    Forces verification of value in text field to pass.

Returns:

  • (Boolean)

    True if the Watir or Watir-webdriver function does not throw an exception.



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.

Parameters:

  • browser (Watir::Browser)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • value (String)

    A string to enter into the text field.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output.

  • skip_value_check (Boolean) (defaults to: false)

    Forces verification of value in text field to pass.

Returns:

  • (Boolean)

    True if the Watir or Watir-webdriver function does not throw an exception.



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.

Parameters:

  • browser (Watir::Browser)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • value (String, Regexp)

    A string or a regular expression to be found in the :value attribute of the element.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    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.

Parameters:

  • browser (Watir::Browser)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • value (String, Regexp)

    A string or a regular expression to be found in the :value attribute of the element.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    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.

Parameters:

  • browser (Watir::Browser, Watir::Container)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • desc (String)

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    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.

Parameters:

  • browser (Watir::Browser, Watir::Container)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    True if the element 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.

Parameters:

  • browser (Watir::Browser, Watir::Container)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    True if the element 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.

Parameters:

  • browser (Watir::Browser, Watir::Container)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    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

Verify that link identified by :text exists.

Parameters:

  • browser (Watir::Browser)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the how attribute that uniquely identifies the element.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    True if the element 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

Parameters:

  • browser (Watir::Browser)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • value (String, Regexp)

    A string or a regular expression to be found in the :value attribute of the element.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    True if the answer to the assertion expressed in the called method name is yes.



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

Parameters:

  • browser (Watir::Browser)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • value (String, Regexp)

    A string or a regular expression to be found in the :value attribute of the element.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    True if the answer to the assertion expressed in the called method name is yes.



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.

Parameters:

  • browser (Watir::Browser, Watir::Container)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    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.

Parameters:

  • browser (Watir::Browser, Watir::Container)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    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.

Returns:

  • (Boolean)

    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.

Parameters:

  • browser (Watir::Browser, Watir::Container)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    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.

Parameters:

  • browser (Watir::Browser, Watir::Container)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    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.

Parameters:

  • browser (Watir::Browser, Watir::Container)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    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.

Parameters:

  • browser (Watir::Browser, Watir::Container)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    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.

Parameters:

  • browser (Watir::Browser, Watir::Container)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    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.

Parameters:

  • browser (Watir::Browser)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • value (String, Regexp)

    A string or a regular expression to be found in the :value attribute of the element.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    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.

Parameters:

  • browser (Watir::Browser)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • value (String, Regexp)

    A string or a regular expression to be found in the :value attribute of the element.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    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.

Parameters:

  • browser (Watir::Browser, Watir::Container)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    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.

Parameters:

  • browser (Watir::Browser)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • value (String, Regexp)

    A string or a regular expression to be found in the :value attribute of the element.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    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.

Parameters:

  • browser (Watir::Browser)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • expected (String, Regexp)

    A string or a regular expression to be found in the :value attribute of the element.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    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.

Parameters:

  • browser (Watir::Browser, Watir::Container)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the specified attribute that uniquely identifies the element.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    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

Note:

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.

Parameters:

  • how_long (Fixnum)

    Timeout limit

  • what_for (Watir::Element)

    A reference to a Dom element to wait for.



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 link, identified by attribute :text with value what exists on the page. Timeout is the default used by watir (60 seconds)

Parameters:

  • browser (Watir::Browser)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the how attribute that uniquely identifies the element.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    True if link exists within timeout limit



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)

Parameters:

  • browser (Watir::Browser)

    A reference to the browser window or container element to be tested.

  • what (String, Regexp)

    A string or a regular expression to be found in the how attribute that uniquely identifies the element.

  • desc (String) (defaults to: '')

    Contains a message or description intended to appear in the log and/or report output

Returns:

  • (Boolean)

    True if radio exists within timeout limit



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