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.

有帮助吗?

解决方案

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);

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top