Module: RadioButtonHelper

Defined in:
lib/watir_helper/radio_button_helper.rb

Instance Method Summary collapse

Instance Method Details

#clear_radio_button(browser_handle, property, property_value) ⇒ Object

Clear a radio button.



14
15
16
# File 'lib/watir_helper/radio_button_helper.rb', line 14

def clear_radio_button(browser_handle, property, property_value)
  browser_handle.radio(property.intern, /#{property_value}/).clear
end

#click_radio_button(browser_handle, property, property_value) ⇒ Object

Click a radio button.



9
10
11
# File 'lib/watir_helper/radio_button_helper.rb', line 9

def click_radio_button(browser_handle, property, property_value)
  browser_handle.radio(property.intern, /#{property_value}/).set
end

#exists_radio_button?(browser_handle, property, property_value) ⇒ Boolean

Check whether a radio button exists or not.



24
25
26
# File 'lib/watir_helper/radio_button_helper.rb', line 24

def exists_radio_button?(browser_handle, property, property_value)
  browser_handle.radio(property.intern, /#{property_value}/).exists?
end

#flash_radio_button(browser_handle, property, property_value) ⇒ Object

Highlight or Flash a radio button.



19
20
21
# File 'lib/watir_helper/radio_button_helper.rb', line 19

def flash_radio_button(browser_handle, property, property_value)
  browser_handle.radio(property.intern, /#{property_value}/).flash
end

#is_radio_button_checked?(browser_handle, property, property_value) ⇒ Boolean

Check whether a radio button is checked or not.



29
30
31
# File 'lib/watir_helper/radio_button_helper.rb', line 29

def is_radio_button_checked?(browser_handle, property, property_value)
  browser_handle.radio(property.intern, /#{property_value}/).checked?
end