C# how to wait for a webpage to finish loading before continuing in watin

StackOverflow https://stackoverflow.com/questions/17898836

  •  04-06-2022
  •  | 
  •  

Pregunta

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.

¿Fue útil?

Solución

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

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top