Sha256: 3ff84d19692c6336f3ff5d74fdabef7ef5036112ac68fdb2e9f596ffed1ab108
Contents?: true
Size: 835 Bytes
Versions: 2
Compression:
Stored size: 835 Bytes
Contents
# feature tests for css $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') unless $SETUP_LOADED require 'unittests/setup' class TC_CSS < Test::Unit::TestCase def isMessageDisplayed(message) divs = browser.divs divs.each do |d| if d.text.downcase.match( /#{message}/i ) if d.class_name.downcase.match(/show/i) return true end end end return false end def setup goto_page "cssTest.html" end def test_SuccessMessage browser.button( :caption , "Success").click assert( isMessageDisplayed("Success") ) browser.button(:caption, "Failure").click assert_false(isMessageDisplayed("Success") ) end def test_inline_style assert_match(/300px/, browser.form(:index, 0).style) end end
Version data entries
2 entries across 2 versions & 2 rubygems
Version | Path |
---|---|
watir-classic-3.0.0 | unittests/css_test.rb |
watir-3.0.0.rc3 | unittests/css_test.rb |