Question

I'm using watin for automation and I'm stuck with a problem. I want to wait for a webpage to finish loading before continue how can I achieve this using watin currently I'm using thread.sleep() for achieve this. What will be the alternative for this and I also tried WaitForComplete() but still its not wait for finish loading the web page.

Was it helpful?

Solution

I solved my problem using WaitUntilExists() method. and I add a 60 seconds time out for the WaitUntilExists() because the default time out is 30 seconds and because of my slow speed of internet I replaced it with 60 seconds like this browser.Div("div1").WaitUntilExists(60);

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top