Module: ImageHelper
- Defined in:
- lib/watir_helper/image_helper.rb
Instance Method Summary collapse
-
#click_image(property, propertyvalue) ⇒ Object
Click an image.
-
#click_image_with_popup(property, propertyvalue) ⇒ Object
Click an image ,after clicking which a pop-up will come.
-
#double_click_image(property, propertyvalue) ⇒ Object
Double Click an image.
-
#double_click_image_with_popup(property, propertyvalue) ⇒ Object
Double Click an image ,after clicking which a pop-up will come.
-
#exists_image(property, propertyvalue) ⇒ Object
Check whether an image exists or not.
-
#flash_image(property, propertyvalue) ⇒ Object
Highlight or Flash an image.
Instance Method Details
#click_image(property, propertyvalue) ⇒ Object
Click an image.
6 7 8 9 |
# File 'lib/watir_helper/image_helper.rb', line 6 def click_image(property,propertyvalue) propertyvalue=/#{propertyvalue}/ $ie.image(property.intern,propertyvalue).click end |
#click_image_with_popup(property, propertyvalue) ⇒ Object
Click an image ,after clicking which a pop-up will come.
12 13 14 15 |
# File 'lib/watir_helper/image_helper.rb', line 12 def click_image_with_popup(property,propertyvalue) propertyvalue=/#{propertyvalue}/ $ie.image(property.intern,propertyvalue).click_no_wait end |
#double_click_image(property, propertyvalue) ⇒ Object
Double Click an image.
18 19 20 21 |
# File 'lib/watir_helper/image_helper.rb', line 18 def double_click_image(property,propertyvalue) propertyvalue=/#{propertyvalue}/ $ie.image(property.intern,propertyvalue).fire_event("ondblclick") end |
#double_click_image_with_popup(property, propertyvalue) ⇒ Object
Double Click an image ,after clicking which a pop-up will come.
24 25 26 27 |
# File 'lib/watir_helper/image_helper.rb', line 24 def double_click_image_with_popup(property,propertyvalue) propertyvalue=/#{propertyvalue}/ $ie.image(property.intern,propertyvalue).fire_event_no_wait("ondblclick") end |
#exists_image(property, propertyvalue) ⇒ Object
Check whether an image exists or not.
36 37 38 39 |
# File 'lib/watir_helper/image_helper.rb', line 36 def exists_image(property,propertyvalue) propertyvalue=/#{propertyvalue}/ $ie.image(property.intern,propertyvalue).exists? end |
#flash_image(property, propertyvalue) ⇒ Object
Highlight or Flash an image.
30 31 32 33 |
# File 'lib/watir_helper/image_helper.rb', line 30 def flash_image(property,propertyvalue) propertyvalue=/#{propertyvalue}/ $ie.image(property.intern,propertyvalue).flash end |