I have the same problem, but I have not found the solution yet.
 
Zeljko


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tuyet Cong-Ton-Nu
Sent: Saturday, August 20, 2005 1:06 AM
To: [email protected]
Subject: [Wtr-general] Sleep statements and Attach

The code below, for example, is a typical thing that I have to do in our application.

1)       Click on an icon to launch the “Select Portfolio” window

2)       The problem is that it may take the “Select Portfolio” window a little while to load,

            so I have to add a Sleep parameter otherwise, the “attach” statement will fail because it can’t find the title

3)       Is there a way to do this without using the Sleep statements?

4)       Also once I am done with this Select Portfolio, I close it, and need to reconnect back to the main window of the application to continue with the script and there again I have to put a Sleep statement.

5)       Any help/suggestion you have to handle this is appreciated

 

            ie.frame("main").frame(:name, "context_bar").image(:src, /icon_open.gif/).click

            sleep 3

      ie = Watir::IE.attach(:title, "Select Portfolio")

 

            #Reconnect back to main frame

            sleep 3

            ie = Watir::IE.attach(:url, "https://test.com/araneae/app")

_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to