Module: ImageHelper
- Defined in:
- lib/watir_helper/image_helper.rb
Instance Method Summary collapse
-
#click_image(browser_handle, property, property_value) ⇒ Object
Click an image.
-
#click_image_with_popup(browser_handle, property, property_value) ⇒ Object
Click an image ,after clicking which a pop-up will come.
-
#double_click_image(browser_handle, property, property_value) ⇒ Object
Double Click an image.
-
#double_click_image_with_popup(browser_handle, property, property_value) ⇒ Object
Double Click an image ,after clicking which a pop-up will come.
-
#exists_image?(browser_handle, property, property_value) ⇒ Boolean
Check whether an image exists or not.
-
#flash_image(browser_handle, property, property_value) ⇒ Object
Highlight or Flash an image.
Instance Method Details
#click_image(browser_handle, property, property_value) ⇒ Object
Click an image.
9 10 11 |
# File 'lib/watir_helper/image_helper.rb', line 9 def click_image(browser_handle, property, property_value) browser_handle.image(property.intern, /#{property_value}/).click end |
#click_image_with_popup(browser_handle, property, property_value) ⇒ Object
Click an image ,after clicking which a pop-up will come.
14 15 16 |
# File 'lib/watir_helper/image_helper.rb', line 14 def click_image_with_popup(browser_handle, property, property_value) browser_handle.image(property.intern, /#{property_value}/).click_no_wait end |
#double_click_image(browser_handle, property, property_value) ⇒ Object
Double Click an image.
19 20 21 |
# File 'lib/watir_helper/image_helper.rb', line 19 def double_click_image(browser_handle, property, property_value) browser_handle.image(property.intern, /#{property_value}/).fire_event("ondblclick") end |
#double_click_image_with_popup(browser_handle, property, property_value) ⇒ Object
Double Click an image ,after clicking which a pop-up will come.
24 25 26 |
# File 'lib/watir_helper/image_helper.rb', line 24 def double_click_image_with_popup(browser_handle, property, property_value) browser_handle.image(property.intern, /#{property_value}/).fire_event_no_wait("ondblclick") end |
#exists_image?(browser_handle, property, property_value) ⇒ Boolean
Check whether an image exists or not.
34 35 36 |
# File 'lib/watir_helper/image_helper.rb', line 34 def exists_image?(browser_handle, property, property_value) browser_handle.image(property.intern, /#{property_value}/).exists? end |
#flash_image(browser_handle, property, property_value) ⇒ Object
Highlight or Flash an image.
29 30 31 |
# File 'lib/watir_helper/image_helper.rb', line 29 def flash_image(browser_handle, property, property_value) browser_handle.image(property.intern, /#{property_value}/).flash end |