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"); }
本文提供了解决使用Internet Explorer浏览器时遇到的关于保护模式的错误的解决方案,通过设置IEDriverOptions来禁用保护模式设置,确保了自动化测试的顺利进行。
1979

被折叠的 条评论
为什么被折叠?



