Hi All,
WATIR: 1.6.2
I tried creating a wrapper script after refering to the unit test
scripts.
To start with, this script:
1. Should call all or specific scripts from a folder
2. should read from a configuration file and setup global variables.
I have written a small script(setup.rb) after refering to setup.rb and
core_tests.rb under watir unit tests folder:
------------------------------------------------------
require 'watir/browser'
$user= 'test'
$pwd='test'
Watir::Browser.default = 'ie'
TOPDIR = File.join(File.dirname(__FILE__))
puts TOPDIR
$all_tests = []
Dir.chdir TOPDIR do
$all_tests += Dir["*.rb"]
end
$watir_only_tests = [
"setup.rb",
].map {|file| "#{file}"}
$all_tests -= $watir_only_tests
puts $all_tests
sleep 20
$all_tests.each {|x| require x}
------------------------------------------------------
My individual test scripts start as shown below:
------------------------------------------------------
require 'watir' # the controller
require 'test/unit'
Watir::Browser.default = 'ie'
$ie = Watir::Browser.new
class test1 < Test::Unit::TestCase
@@ordernum = 0
def test_a_orderPlacement
end
end
------------------------------------------------------
Current issues with it:
1. Its running the tests against Firefox, though I have set
Watir::Browser.default to ie.
2. Also it opens up 2 firefox windows, since there are 2 test scripts
to get executed. I want the scripts should get invoked sequentially.
Please advise.
Thanks,
Natasha
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Watir General" group.
To post to this group, send email to [email protected]
Before posting, please read the following guidelines:
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---