初学Selenium遇上的问题
1.IWebDriver driver = new InternetExplorerDriver();运行时报关于protecte model的错误
解决办法就是用如下代码设置IEDriverOpiton,并将IEDriverServer.exe放在IE的同级目录下 C:\Program Files (x86)\Internet Explorer
static void Main(string[] args) { InternetExplorerOptions ieO = new InternetExplorerOptions(); //set ingnore protected mode as True ieO.IntroduceInstabilityByIgnoringProtectedModeSettings = true; IWebDriver driver = new InternetExplorerDriver(@"C:\Program Files (x86)\Internet Explorer", ieO); driver.Navigate().GoToUrl("http://www.cnblogs.com"); }

浙公网安备 33010602011771号