我試圖創建一個程序,通過我們的缺陷跟蹤系統的Web界面一次克隆多個錯誤。在我繼續之前,如何在頁面完全加載之前等待?C#如何在繼續之前等待網頁完成加載
//This is pseudo code, but this should give you an idea of what I'm trying to do. The
//actual code uses multi-threading and all that good stuff :).
foreach (string bug in bugs)
{
webBrowser.Navigate(new Uri(url));
webBrowser.Document.GetElementById("product").SetAttribute("value", product);
webBrowser.Document.GetElementById("version").SetAttribute("value", version);
webBrowser.Document.GetElementById("commit").InvokeMember("click");
//Need code to wait for page to load before continuing.
}
我有同樣的問題,但WebView。任何想法如何等待,直到它完成加載? – yalematta 2016-08-11 11:26:59