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

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

  •  04-06-2022
  •  | 
  •  

문제

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