Module: SelectListHelper
- Defined in:
- lib/watir_helper/select_list_helper.rb
Instance Method Summary collapse
-
#clear_selection_from_select_list(property, propertyvalue) ⇒ Object
Clear selection from a Select list.
-
#exists_select_list(property, propertyvalue) ⇒ Object
Check whether a Select list exists or not.
-
#flash_select_list(property, propertyvalue) ⇒ Object
Highlight or Flash a Select list.
-
#get_all_contents_of_select_list(property, propertyvalue) ⇒ Object
Get all contents of a Select list.
-
#is_value_selected_from_select_list(property, propertyvalue, selected_value) ⇒ Object
Check whether a particular value is selected from a Select list or not.
-
#select_from_select_list(property, propertyvalue, selected_value) ⇒ Object
Select from a Select list.
Instance Method Details
#clear_selection_from_select_list(property, propertyvalue) ⇒ Object
Clear selection from a Select list.
12 13 14 15 |
# File 'lib/watir_helper/select_list_helper.rb', line 12 def clear_selection_from_select_list(property,propertyvalue) propertyvalue=/#{propertyvalue}/ $ie.select_list(property.intern,propertyvalue).clearSelection end |
#exists_select_list(property, propertyvalue) ⇒ Object
Check whether a Select list exists or not.
30 31 32 33 |
# File 'lib/watir_helper/select_list_helper.rb', line 30 def exists_select_list(property,propertyvalue) propertyvalue=/#{propertyvalue}/ $ie.select_list(property.intern,propertyvalue).exists? end |
#flash_select_list(property, propertyvalue) ⇒ Object
Highlight or Flash a Select list.
24 25 26 27 |
# File 'lib/watir_helper/select_list_helper.rb', line 24 def flash_select_list(property,propertyvalue) propertyvalue=/#{propertyvalue}/ $ie.select_list(property.intern,propertyvalue).flash end |
#get_all_contents_of_select_list(property, propertyvalue) ⇒ Object
Get all contents of a Select list.
18 19 20 21 |
# File 'lib/watir_helper/select_list_helper.rb', line 18 def get_all_contents_of_select_list(property,propertyvalue) propertyvalue=/#{propertyvalue}/ $ie.select_list(property.intern,propertyvalue).getAllContents end |
#is_value_selected_from_select_list(property, propertyvalue, selected_value) ⇒ Object
Check whether a particular value is selected from a Select list or not.
36 37 38 39 |
# File 'lib/watir_helper/select_list_helper.rb', line 36 def is_value_selected_from_select_list(property,propertyvalue,selected_value) propertyvalue=/#{propertyvalue}/ $ie.select_list(property.intern,propertyvalue).selected?(selected_value) end |
#select_from_select_list(property, propertyvalue, selected_value) ⇒ Object
Select from a Select list.
6 7 8 9 |
# File 'lib/watir_helper/select_list_helper.rb', line 6 def select_from_select_list(property,propertyvalue,selected_value) propertyvalue=/#{propertyvalue}/ $ie.select_list(property.intern,propertyvalue).select(selected_value) end |