Waiting for WebBrowser ajax content

前端 未结 4 1293
感动是毒
感动是毒 2021-02-14 14:21

I want to pause the execution of my thread until a particular div has been loaded via ajax into a WebBrowser instance. Obviously I can continuously check for the presence of thi

4条回答
  •  时光说笑
    2021-02-14 14:51

    You can find a text into body for example:

    while (HtmlWindow.Document.Body.InnerHtml.Contains(some_text) == false)
    {        
        Application.DoEvents();
        Thread.Sleep(200);
    }
    

提交回复
热议问题