|
Hi- I’ve checked through the Rubyforge mail history but
haven’t found a solution so far. I’m trying to mimic the scripting101 labs examples,
testing against a web app- I have 2 files: harness.rb # Simple test harness require 'watir' require 'test/unit' $LOAD_PATH << '.' class TestSuite < Test::Unit::TestCase def centralvision load 'centralvision.rb' end def teardown ie = Watir::IE.attach(:title, /Central Vision/) ie.close end end and the test I’m calling: # Simple script tests the fields of the Central Vision login
page. require 'watir' require 'test/unit/assertions' include Test::Unit::Assertions # launch ie =
Watir::IE.start('http://everestcf/CV_Tay_Test/home/Index.cfm') # verify the username text entry field #exists assert( ie.frame("main").text_field.exists?(:name,
"username" )) #is blank assert( ie.frame("main").text_field. ==
"" )) # verify the password text entry field #exists assert( ie.frame("main").text_field.exists?(:name,
"password" )) #is blank assert( ie.frame("main").text_field. ==
"" )) # verify the ldap drop down chooser field #exists assert(
ie.frame("main").select_list.exists?(:name, "ldapDir")) I modified the $LOAD_PATH variable to say this directory
only (although I don’t know if that was necessary.) Basically every time I run the harness I get the following: >ruby harness.rb Loaded suite harness Started FE Finished in 0.063 seconds. 1) Failure: default_test(TestSuite) [harness.rb:12]: No tests were specified. 2) Error: default_test(TestSuite): Watir::Exception::NoMatchingWindowFoundException: Unable to
locate a window with title of (?-mix:Central Vision) c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1208:in
`attach_browser_window' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1111:in
`attach_init' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1104:in `attach' harness.rb:13:in `teardown' 1 tests, 1 assertions, 1 failures, 1 errors I’m really getting confused with this now, I’ve
tried to keep my code as simple as possible, but can’t see where I’m
going wrong? Any help is much appreciated. thanks Max
Russell test
Analyst. InPS Tel:
01382 223900 Fax: 01382
204488 Visit our Web site at www.inps.co.uk The
information in this internet email is confidential and is intended solely for
the addressee. Access, copying or re-use of information in it by anyone else is
not authorised. Any views or opinions presented are solely those of the author
and do not necessarily represent those of In Practice Systems Limited or any of
its affiliates. If you are not the intended recipient please contact
[EMAIL PROTECTED] |
_______________________________________________ Wtr-general mailing list [email protected] http://rubyforge.org/mailman/listinfo/wtr-general
