Module: SpanHelper

Defined in:
lib/watir_helper/span_helper.rb

Instance Method Summary collapse

Instance Method Details

#click_span(browser_handle, property, property_value) ⇒ Object

Click a span element



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

def click_span(browser_handle, property, property_value)
  browser_handle.span(property.intern, /#{property_value}/).click
end

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

Check whether a span exists or not.

Returns:

  • (Boolean)


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

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

#flash_span(browser_handle, property, property_value) ⇒ Object

Highlight or Flash a span.



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

def flash_span(browser_handle, property, property_value)
  browser_handle.span(property.intern, /#{property_value}/).flash
end