Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/image-processing/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 如何配置IEDriverServer以在IE8上进行测试_Java_Eclipse_Selenium_Selenium Webdriver - Fatal编程技术网

Java 如何配置IEDriverServer以在IE8上进行测试

Java 如何配置IEDriverServer以在IE8上进行测试,java,eclipse,selenium,selenium-webdriver,Java,Eclipse,Selenium,Selenium Webdriver,拜托,我用SeleniumWebDriverJava做自动化测试 对于IE测试,我做了: **System.setProperty("webdriver.ie.driver", "C:\\dev\\drivers\\IeDriver\\IEDriverServer.exe"); DesiredCapabilities sCaps = DesiredCapabilities.internetExplorer(); sCaps.set

拜托,我用SeleniumWebDriverJava做自动化测试

对于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(); 设定能力( InternetExplorerDriver.通过忽略安全域引入片状, 正确的); 设定能力( InternetExplorerDriver.Ignore受保护的节点设置, 正确的); //sCaps.setJavascriptEnabled(true); 驱动程序=新的InternetExplorerDriver(sCaps)

提前感谢,


在IE 7或更高版本上,在Windows Vista或Windows 7上

  • 必须将每个区域的保护模式设置设置为相同的值
  • 所有区域的增强保护模式必须相同。(我更喜欢禁用它,因为这是IE 10及更高版本的要求。) 此外,IE 10及更高版本必须禁用“增强保护模式”。此选项位于“Internet选项”对话框的“高级”选项卡中
  • 浏览器缩放级别必须设置为100%,以便将本机鼠标事件设置为正确的坐标
  • 如何做以上步骤

    请看以下视频:。我已经展示了步骤


    希望这有帮助。谢谢:)

    您不能在同一台计算机上运行多个版本的IE


    如果您使用Selenium Grid,使用不同版本的IE将Windows节点连接到集线器,您可以使用RemoteWebDriver而不是InternetExplorerDriver。

    谢谢您的回答。我使用selenium webdriver。仅在IE8上进行测试时,我应该做些什么?您必须在安装了IE8的计算机上运行测试,并将webdriver.IE.driver系统属性指向IE WebDriver。我试图下载IE8 for windows 7 64位,但我只找到了:windows Internet Explorer 8 pour windows Server 2003 SP2版本64位windows Internet Explorer 8 pour windows Vista 64位et windows Server 2008版本64位windows Internet Explorer 8 pour windows Vista et windows Server 2008请,如果我只使用IE11,我应该怎么做来调整我的代码?非常感谢我配置了IE的选项,我在IE上的测试工作正常,但是为了自动化,我应该使用DesiredCapabilities?不是吗?我更新了问题中的代码,因为我在IE中使用了DesiredCapabilities。请看结尾。您在KhalidKsouri设置了正确的功能。但是我告诉你的设置对于在IE上运行你的测试是非常重要的。如果答案对你有帮助,请投赞成票。很高兴提供帮助:)谢谢,但我没有找到要使用的内容:具有所需功能的IgnoreProtectedModeSetting?因为“ignoreProtectedModeSettings”没有变量;ieOptions.IgnoreZoomLevel=true;ieOptions.enablenavitiveEvents=false;ieOptions.IntroductionInstabilityByIgnoringProtectedModeSettings=true_driver=新的InternetExplorerDriver(ieDriverServerLocation、ieOptions、TimeSpan.FromMillimes(tTimeouts))此代码将帮助您忽略保护模式设置