In the following code I am using Rspec for putting my results in proper format.
If I am executing the below code by commenting the class declaration then its working fine but if I want to use watir class here like the code below then it not working and I got the following error on console. C:\RubyScripts\example>spec google.rb --format html > testresults.html ./google.rb:23:in `initialize': wrong number of arguments (0 for 1) (ArgumentError) from ./google.rb:23:in `new' from ./google.rb:23 from C:/Ruby/lib/ruby/gems/1.8/gems/rspec-1.1.11/lib/spec/ runner/example_group_runner.rb:14:in `load' from C:/Ruby/lib/ruby/gems/1.8/gems/rspec-1.1.11/lib/spec/ runner/example_group_runner.rb:14:in `load_files' from C:/Ruby/lib/ruby/gems/1.8/gems/rspec-1.1.11/lib/spec/ runner/example_group_runner.rb:13:in `each' from C:/Ruby/lib/ruby/gems/1.8/gems/rspec-1.1.11/lib/spec/ runner/example_group_runner.rb:13:in `load_files' from C:/Ruby/lib/ruby/gems/1.8/gems/rspec-1.1.11/lib/spec/ runner/options.rb:99:in `run_examples' from C:/Ruby/lib/ruby/gems/1.8/gems/rspec-1.1.11/lib/spec/ runner/command_line.rb:10:in `run' from C:/Ruby/lib/ruby/gems/1.8/gems/rspec-1.1.11/bin/spec:4 from C:/Ruby/bin/spec:19:in `load' from C:/Ruby/bin/spec:19 require 'watir' require 'win32ole' require 'watir/testcase' $browser = Watir::IE.new $browser.maximize class TC_GoogleTest < Watir::TestCase def test_google context "Google's search page" do setup do $browser.goto('http://www.google.com') end specify "should find ruby home page when I search for ruby" do $browser.text_field(:name, "q").set("ruby") $browser.button(:name, "btnG").click $browser.contains_text("rubyforge.org") end end end end Please help me with this. Thanks, Jagdeep --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~----------~----~----~----~------~----~------~--~---