Thanks for your help John - I really appreciate it. As you rightly
pointed out, it still didn't work, but I didn't want to annoy you all
again with another post. I will try this tonight when I get home.

Cheers,

Matt

On Aug 26, 11:38 pm, John Kolokotronis <johnj...@gmail.com> wrote:
> The first error is the missing double quotes, like Željko pointed out.
> Your script will still not run though as there are a couple of other
> errors. You set up the browser like this:
>
> $ff = FireWatir::Firefox.new
>
> instead of:
>
> Ff=Firefox.new (if you use a capital letter, you set up the browser
> instance a constant, most people use a global variable instead.)
>
> You also tend to set up things as constants (e.g. Test_site on line 2)
> and then call it as a local variable (test_site on line 4) - remember,
> the variables are case sensitive...
>
> You also need to call the various methods like "button", "text_field",
> etc on the browser object, $ff in this case. So the script would
> become something like this:
>
> require 'firewatir'
>
> test_site = "http://www.google.com";
> $ff = FireWatir::Firefox.new
>
> $ff.goto test_site
> $ff.text_field(:name, 'q').set 'Watir'
> $ff.button(:name, 'btnG').click
> if $ff.contains_text('Web Application')
>    puts 'Test Passed'
> else
>    puts 'Test Failed'
> end
>
> I hope this helps.
>
> Regards,
>
> John
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to