我試圖在Windows 7 64位PC上瀏覽Internet Explorer 11中的URL時出現此錯誤。無法使用webdriver打開InternetExplorer
IWebDriver NewDriver = new InternetExplorerDriver("D:\\"); //IEDriverServer(64bit) is saved in D:\
NewDriver.Navigate().GoToUrl("http://www.google.com");
NewDriver.Manage().Window.Maximize();
IWait<IWebDriver> wait1 = new WebDriverWait(NewDriver, TimeSpan.FromSeconds(5.00));
//ERROR AT THIS LINE
wait1.Until(driver1 => ((IJavaScriptExecutor)NewDriver).ExecuteScript("return document.readyState;").Equals("complete"));
錯誤:JavaScript錯誤(UnexpectedJavaScriptError)
我已經設置IE中的所有安全選項的安全區,以 '啓用保護模式',並卸載Windows更新 'KB3025390'。調試時,我看到正在加載的谷歌頁面。
相同的代碼適用於FirefoxDriver。一些更爲合理的
你在你的設置IE的conf或寫能力感到失望可讀的代碼或使用硒或所有上述? – Margus
以上所有 – Qwerty