请用selenium webdriver Java进行自动化测试。
对于IE的测试,我做了:
**System.setProperty("webdriver.ie.driver",
"C:\\dev\\drivers\\IeDriver\\IEDriverServer.exe");
DesiredCapabilities sCaps = DesiredCapabilities.internetExplorer();
sCaps.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS, true);
sCaps.setJavascriptEnabled(true);
driver = new InternetExplorerDriver(sCaps);**
但是,我不知道如何配置IE的所有版本(从IE8开始)?
你能告诉我你的建议吗?我为IE开发了这部分代码:DesiredCapabilities sCaps = DesiredCapabilities.internetExplorer(); sCaps.setCapability( InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS, 真正); sCaps.setCapability( InternetExplorerDriver.ignoreProtectedModeSettings, 真正); //sCaps.setJavascriptEnabled(true); driver = new InternetExplorerDriver(sCaps);
先谢谢,
Kinds Regards,
答案 0 :(得分:0)
在Windows Vista或Windows 7上的IE 7或更高版本
如何做以上步骤???
观看此视频:http://screencast.com/t/5nlxsrje4I。我已经展示了这些步骤。
希望这会有所帮助。谢谢:))
答案 1 :(得分:0)
您无法在同一台计算机上运行多个版本的IE。
最简单的方法是使用Selenium Grid,使用不同版本的IE将Windows节点连接到集线器,并使用RemoteWebDriver而不是InternetExplorerDriver。