# File lib/webrat/selenium/matchers/have_selector.rb, line 5 def initialize(expected) @expected = expected end
# File lib/webrat/selenium/matchers/have_selector.rb, line 17 def does_not_match?(response) response.session.wait_for do !response.selenium.is_element_present("css=#{@expected}") end rescue Webrat::TimeoutError false end
The failure message.
# File lib/webrat/selenium/matchers/have_selector.rb, line 27 def failure_message "expected following text to match selector #{@expected}:\n#{@document}" end
# File lib/webrat/selenium/matchers/have_selector.rb, line 9 def matches?(response) response.session.wait_for do response.selenium.is_element_present("css=#{@expected}") end rescue Webrat::TimeoutError false end
The failure message to be displayed in negative matches.
# File lib/webrat/selenium/matchers/have_selector.rb, line 33 def negative_failure_message "expected following text to not match selector #{@expected}:\n#{@document}" end