綜上所述,我想要做的是「開放」的網頁driver.Navigate().GoToUrl("http://somepage.com")
然後立即塊從"http://somepage.com/something.asmx/GetStuff"
的響應,這樣我可以證實,一些元素有一定的在加載響應之前的類:driver.FindElement(By.CssSelector("buttom.some-button")).GetAttribute("class").Contains("disabled")
,然後是disabled
。如何「塊」的Ajax響應使用Selenium
是這樣的可能,如果是這樣,我怎麼做呢?
我的問題是在什麼它試圖實現類似Selenium Webdriver c# without waiting for page to load。
我不認爲你可以使用Selenium爲,但FiddlerCore配對應該是可行的 - http://stackoverflow.com/questions/25541499/how-to-capture-http-request-using-fiddlercore-在-C/26323323#26323323 –