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

后端 未结 11 1277
暖寄归人
暖寄归人 2020-11-27 03:33

I\'m trying to create a program to clone multiple bugs at a time through the web interface of our defect tracking system. How can I wait before a page is completely loaded

11条回答
  •  再見小時候
    2020-11-27 04:03

    while (true)
            {//ie is the WebBrowser object
                if (ie.ReadyState == tagREADYSTATE.READYSTATE_COMPLETE)
                {
                    break;
                }
                Thread.Sleep(500);
            }
    

    I used this way to wait untill the page loads.

提交回复
热议问题