Sha256: 7dce0b570c9f6c55f11828572b17126008afb97f9c2b5fa5f22edeb701cc2c68
Contents?: true
Size: 1.12 KB
Versions: 3
Compression:
Stored size: 1.12 KB
Contents
# revision: $Revision$ $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') unless $SETUP_LOADED require 'unittests/setup' class TC_PopUps < Test::Unit::TestCase tags :must_be_visible, :creates_windows, :unreliable def setup browser.goto("file://#{$myDir}/html/popups1.html") end def startClicker( button , waitTime = 0.5) w = WinClicker.new longName = browser.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") browser.button("Alert").click end def test_confirm startClicker("OK") browser.button("Confirm").click assert( browser.text_field(:name , "confirmtext").verify_contains("OK") ) startClicker("Cancel") browser.button("Confirm").click assert( browser.text_field(:name , "confirmtext").verify_contains("Cancel") ) end def xtest_Prompt startClicker("OK") browser.button("Prompt").click end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
watir-1.6.6 | unittests/popups_test.rb |
watir-1.6.6.rc2 | unittests/popups_test.rb |
watir-1.6.6.rc1 | unittests/popups_test.rb |