Sha256: 7811b0298b46c3dfb5d7c44177dbc8db30566084b2a4ebd0bf702472ee0d8fa0
Contents?: true
Size: 1023 Bytes
Versions: 9
Compression:
Stored size: 1023 Bytes
Contents
require 'minitest/assertions' module Browsery module Utils # A collection of custom, but frequently-used assertions. module AssertionHelper # 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] def assert_element_absent(how, what) assert_raises Selenium::WebDriver::Error::NoSuchElementError do @driver.find_element(how, what) end end # 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] def assert_element_present(how, what) @driver.find_element(how, what) end end end end
Version data entries
9 entries across 9 versions & 1 rubygems