module MiniAutobot::Utils::AssertionHelper
A collection of custom, but frequently-used assertions.
Public Instance Methods
assert_element_absent(how, what)
click to toggle source
Assert that an element, specified by `how` and `what`, are absent from the current page's context.
@param how [:class, :class_name, :css, :id, :link_text, :link,
:partial_link_text, :name, :tag_name, :xpath]
@param what [String, Symbol]
# File lib/mini_autobot/utils/assertion_helper.rb, line 15 def assert_element_absent(how, what) assert_raises Selenium::WebDriver::Error::NoSuchElementError do @driver.find_element(how, what) end end
assert_element_present(how, what)
click to toggle source
Assert that an element, specified by `how` and `what`, are present from the current page's context.
@param how [:class, :class_name, :css, :id, :link_text, :link,
:partial_link_text, :name, :tag_name, :xpath]
@param what [String, Symbol]
# File lib/mini_autobot/utils/assertion_helper.rb, line 27 def assert_element_present(how, what) @driver.find_element(how, what) end