C#Selenium使用GoUrl然后无法找到它总是超时的Element

时间:2019-03-21 14:06:52

标签: c# selenium webdriver

我可以异步加载此页面吗?我不需要全部加载的文档即可查找元素。  我需要加载页面可以是findElement并立即执行js  我该怎么办?

// this Url page contains a so many large JS file.
driver.Manage().Timeouts().PageLoad = TimeSpan.FromSeconds(10);
driver.Navigate().GoToUrl(Url); // waiting for 10s
// after 10s the code will throw timeout exception.
// and cannot Run this code:
((IJavaScriptExecutor)driver).ExecuteScript(Js); // this code it throw Timeout Exception

gourl is timeout

but the page is is load , and a js file is pedding

enter image description here


ExecuteScript错误消息是: 超时   (会议信息:chrome = 73.0.3683.86)   (驱动程序信息:chromedriver = 2.43.600210(68dcf5eebde37173d4027fa8635e332711d2874a),platform = Windows NT 10.0.17134 x86_64)

0 个答案:

没有答案