Module: WebStepsHelpers
- Defined in:
- lib/spreewald_support/web_steps_helpers.rb
Instance Method Summary collapse
- #assert_hidden(options) ⇒ Object
- #assert_visible(options) ⇒ Object
- #find_with_disabled(*args, **options, &optional_filter_block) ⇒ Object
Instance Method Details
#assert_hidden(options) ⇒ Object
9 10 11 |
# File 'lib/spreewald_support/web_steps_helpers.rb', line 9 def assert_hidden() visibility_test(.merge(:expectation => :hidden)) end |
#assert_visible(options) ⇒ Object
5 6 7 |
# File 'lib/spreewald_support/web_steps_helpers.rb', line 5 def assert_visible() visibility_test(.merge(:expectation => :visible)) end |
#find_with_disabled(*args, **options, &optional_filter_block) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/spreewald_support/web_steps_helpers.rb', line 13 def find_with_disabled(*args, **, &optional_filter_block) if Spreewald::Comparison.compare_versions(::VERSION, :<, "2.0") find(:xpath, XPath::HTML.send(args[0], args[1])) # Versions < 2.0 will find both enabled and disabled fields, nothing to do elsif Spreewald::Comparison.compare_versions(::VERSION, :<, "2.6") begin find(*args, **, disabled: false, &optional_filter_block) rescue ::ElementNotFound find(*args, **, disabled: true, &optional_filter_block) end else = { disabled: :all }.merge() find(*args, **, &optional_filter_block) end end |