Module: WatirRobot::Radio
- Included in:
- KeywordLibrary
- Defined in:
- lib/watir_robot/keywords/radio.rb
Overview
Functionality related to radio button form elements
Instance Method Summary collapse
-
#radio_button_should_be_selected(loc) ⇒ Object
Verify that radio button is selected.
-
#radio_button_should_not_be_selected(loc) ⇒ Object
Verify that radio button is not selected.
-
#select_radio_button(loc) ⇒ Object
Select a radio button.
Instance Method Details
#radio_button_should_be_selected(loc) ⇒ Object
Verify that radio button is selected
27 28 29 30 |
# File 'lib/watir_robot/keywords/radio.rb', line 27 def (loc) raise(Exception::RadioSelectionError, "The radio button located at #{loc} is not selected.") unless @browser.radio(parse_location(loc)).set? end |
#radio_button_should_not_be_selected(loc) ⇒ Object
Verify that radio button is not selected
37 38 39 40 |
# File 'lib/watir_robot/keywords/radio.rb', line 37 def (loc) raise(Exception::RadioSelectionError, "The radio button located at #{loc} is selected erroneously.") if @browser.radio(parse_location(loc)).set? end |
#select_radio_button(loc) ⇒ Object
Select a radio button
15 16 17 |
# File 'lib/watir_robot/keywords/radio.rb', line 15 def (loc) @browser.radio(parse_location(loc)).set end |