Hello,
I'm new to watir and scripting in general. The tool is still easy enough
that I have automated many testcases already. On to my problem:
I have a page where selecting the sign in link opens a new window with the
sign in form, I set watir's focus on this new window with the attach command
an
Alan Jahns wrote:
> I have some simple if/else statements to check
> if some text strings are on the original window, but it seems that it no
> longer sees the original window. How would I make watir switch focus back?
One likely mistake is to use the same variable, like "ie", for both the
pare
I tried it at first with "ie" for both but then relized that mistake and
changed it to "ie2" for the new window.
Do I have to I have to use attach to shift focus back to the first window?
Could it be that since after submitting the log in credentials the 2nd
window closes and the first window tak
On 12/4/2006, "Alan Jahns" <[EMAIL PROTECTED]> wrote:
>Could it be that since after submitting the log in credentials the 2nd
>window closes and the first window takes a few secs to reload?
Yes, I think that's probably the problem - your code has a race
condition. There is a wait function that you
Well thanks a lot, you led me to the fix. It does seem to be a timing
problem, I started googling to figure out how to do a loop as you suggested
and while doing that found the sleep command, so I tried something like:
ie2.button(:value, "Sign In").click
# take a nap to wait for first page to l
On 12/4/2006, "Alan Jahns" <[EMAIL PROTECTED]> wrote:
>Well thanks a lot, you led me to the fix. It does seem to be a timing
>problem, I started googling to figure out how to do a loop as you suggested
>and while doing that found the sleep command, so I tried something like:
>
>ie2.button(:value, "
Thanks for the outline in the pseudocode, I do want to do something better
than just make it sleep, its one of those hurry up and get it to work right
now so bosses are happy, then make it work better afterwards kind of
situations.
Alan
On 12/4/06, Danny R. Faught <[EMAIL PROTECTED]> wrote:
On