Hi Folks,

I have scripts that use authentication. So when I start my first test, it goes 
to a login page and once I click the login button, my test runs.
Subsequent tests runs without going to the login page as I'm now authorished to 
run the rest of the scripts.

So in my code if the login button appears, I click it.
If it doesn't appear due to me being already logged in, it justs prints a 
message and runs the rest of the script.
Watir doesn't this fine i.e. clicks the login button if there, otherwise 
ignores it
However FireWatir doesn't ignore the login button and bombs out when it sees it.

<code>
if browser.contains_text("Login Page")
browser.button(:name, "LoginButton").click
                                puts "  Action: clicked the Login button."
                        else
                                puts "  Action: the login page didn't appear"
                        end
</code>
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to