On Fri, Jul 27, 2012 at 12:14 AM, MjHerz <[email protected]> wrote:
> but how can this work manually yet not work when I run the whole .rb file?

If it works in IRB but not when you run the script, the usual cause is that
when you type commands in IRB there is a few seconds between each command.
When you run the script, there is no delay between commands.

> Is it needing an additional few seconds (i.e. a wait command or
something) between browser.a(:text => "About").hover and browser.a(:text =>
"The Team").click ?

Try this:

browser.a(:text => "About").hover
browser.a(:text => "The Team").when_present.click

More information:

http://watirwebdriver.com/waiting/

Željko
--
filipin.eu

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

[email protected]
http://groups.google.com/group/watir-general
[email protected]

Reply via email to