You may change *Class TestGoogle < Test::Unit::TestCase* to *class TestGoogle < Watir::TestCase* And *require 'watir' require 'watir/testcase'*
Thanks. Wesley Chen. For life, the easier, the better. On Sat, Jan 16, 2010 at 5:35 AM, Bill Agee <billa...@gmail.com> wrote: > Can you post the complete backtrace? I bet the method "test_entertext" is > being run before "test_start". > > If I remember correctly, Test::Unit runs the methods inside a test class in > asciibetical order. > > You might want to collapse all three of those methods into one. There's > probably no real gain in having them be separated. > > > On Fri, Jan 15, 2010 at 11:31 AM, tester86 <sagar.am...@gmail.com> wrote: > >> Hi >> >> Please note that this is an example of what tests. >> >> Class TestGoogle < Test::Unit::TestCase >> >> def test_start() >> >> $b=Watir::Browser.start("https://www.google.com") >> >> end >> >> def test_entertext() >> $b.text_field(:name, "SearchField").set("Search") >> $b.button(:name, "btnG").click >> end >> >> def test_verify() >> >> if $b.contains_text("Search") >> puts "passed" >> else >> puts "failed" >> end >> >> end >> >> end >> >> In my options.yml if I tell it to run with IE then in command prompt I >> get the error $b is not defined. >> >> -- >> >> 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 >> > > > -- > 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 >
-- 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