Sha256: ba10964093e3cb1aa23cee6ed9a3bd271ba9c3b9d2563bf4f7051d10447edee9
Contents?: true
Size: 1.17 KB
Versions: 1
Compression:
Stored size: 1.17 KB
Contents
# feature tests for javascript PopUps # revision: $Revision: 1.13 $ $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') if $0 == __FILE__ require 'unittests/setup' class TC_PopUps < Test::Unit::TestCase include Watir def setup $ie.goto("file://#{$myDir}/html/popups1.html") end def startClicker( button , waitTime = 0.5) w = WinClicker.new longName = $ie.dir.gsub("/" , "\\" ) shortName = w.getShortFileName(longName) c = "start rubyw #{shortName }\\watir\\clickJSDialog.rb #{button } #{ waitTime} " puts "Starting #{c}" w.winsystem(c ) w=nil end def test_simple startClicker("OK") $ie.button("Alert").click end def test_confirm startClicker("OK") $ie.button("Confirm").click assert( $ie.text_field(:name , "confirmtext").verify_contains("OK") ) startClicker("Cancel") $ie.button("Confirm").click assert( $ie.text_field(:name , "confirmtext").verify_contains("Cancel") ) end def xtest_Prompt startClicker("OK") $ie.button("Prompt").click end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
watir-1.4.1 | unittests/popups_test.rb |