Module: ButtonHelper

Defined in:
lib/watir_helper/button_helper.rb

Instance Method Summary collapse

Instance Method Details

#click_button(property, propertyvalue) ⇒ Object

Click a button.



6
7
8
9
# File 'lib/watir_helper/button_helper.rb', line 6

def click_button(property,propertyvalue)
  propertyvalue=/#{propertyvalue}/
  $ie.button(property.intern,propertyvalue).click
end

#click_button_with_popup(property, propertyvalue) ⇒ Object

Click a button ,after clicking which a pop-up will come.



12
13
14
15
# File 'lib/watir_helper/button_helper.rb', line 12

def click_button_with_popup(property,propertyvalue)
  propertyvalue=/#{propertyvalue}/
  $ie.button(property.intern,propertyvalue).click_no_wait
end

#double_click_button(property, propertyvalue) ⇒ Object

Double Click a button.



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

def double_click_button(property,propertyvalue)
  propertyvalue=/#{propertyvalue}/
 $ie.button(property.intern,propertyvalue).fire_event("ondblclick") 
end

#double_click_button_with_popup(property, propertyvalue) ⇒ Object

Double Click a button ,after clicking which a pop-up will come.



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

def double_click_button_with_popup(property,propertyvalue)
  propertyvalue=/#{propertyvalue}/
  $ie.button(property.intern,propertyvalue).fire_event_no_wait("ondblclick") 
end

#exists_button(property, propertyvalue) ⇒ Object

Check whether a button exists or not.



36
37
38
39
# File 'lib/watir_helper/button_helper.rb', line 36

def exists_button(property,propertyvalue)
  propertyvalue=/#{propertyvalue}/
  $ie.button(property.intern,propertyvalue).exists?
end

#flash_button(property, propertyvalue) ⇒ Object

Highlight or Flash a button.



30
31
32
33
# File 'lib/watir_helper/button_helper.rb', line 30

def flash_button(property,propertyvalue)
  propertyvalue=/#{propertyvalue}/
  $ie.button(property.intern,propertyvalue).flash
end