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

后端 未结 11 1282
暖寄归人
暖寄归人 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 03:57

    This code was very helpful for me. Maybe it could be for you also

    wb.Navigate(url);
    while(wb.ReadyState != WebBrowserReadyState.Complete)
    {
         Application.DoEvents();
    }
    MessageBox.Show("Loaded");
    

提交回复
热议问题