로드되지 될 수 있다는 사실을 무시 버튼을 조작 할 수 있습니다, 당신은 페이지로드 시간 제한을 설정할 수 있습니다. 그러나주의해야 할 몇 가지주의 사항이 있습니다. 첫째, 모든 브라우저에서이 기능을 구현하지 않았습니다. 메모리가 작동하면 IE와 Firefox에서 작동합니다. 둘째, 제대로 작동하게하려면 예외를 잡아야하지만 완료 할 수 있습니다.
// WARNING! Completely untested code written without
// the benefit of an IDE!
IWebDriver driver = new InternetExplorerDriver();
driver.Manage().Timeouts().SetPageLoadTimeout(TimeSpan.FromSeconds(1));
try
{
driver.Url = "http://your.long.loading.page.com";
}
catch (TimeoutException)
{
// NOTE: In 2.26 or later, this will be WebDriverTimeoutException
}
WebDriverWait wait = new WebDriverWait(driver, TimeSpan.FromSeconds(10));
IWebElement element = wait.Until<IWebElement>((d) =>
{
return d.FindElement(By.Id("yourId"));
}