0

*我无法使用配置 IE Driver 3.11.1 和 selenium 3.11.0 启动 IE。

相同的代码适用于 Selenium WebDriver 3.6.0 ,但在 3.7.0 及更高版本中失败。

代码:-

InternetExplorerOptions options=new InternetExplorerOptions();
                    //options.destructivelyEnsureCleanSession();
                    options.ignoreZoomSettings();
                    options.introduceFlakinessByIgnoringSecurityDomains();

                    System.setProperty("webdriver.ie.driver",ReadProperty.dictProjectVar.get("Driver")+"IEDriverServer.exe");                                                                                
                    if (Launcher.dicConfig.get("DistributedExecution").equalsIgnoreCase("yes")){
                        driver = new RemoteWebDriver(new URL("http://"+ dicMachineIPs.get("Hub")+":4444/wd/hub"), DesiredCapabilities.internetExplorer());
                    }
                    else{
                        driver = new InternetExplorerDriver(options);

                    }  

抛出的错误是:-

org.openqa.selenium.InvalidArgumentException:所有 firstMatch 元素验证失败 firstMatch 元素中的无效功能 0:名为 ensureCleanSession 构建信息的未知功能:版本:'3.9.1',修订:'63f7b50',时间:'2018-02-07T22: 25:02.294Z' 系统信息:主机:'5CG3455ZG9',ip:'10.4.5.242',os.name:'Windows 8.1',os.arch:'amd64',os.version:'6.3',java.version :'1.8.0_161' 驱动程序信息:driver.version:InternetExplorerDriver 远程堆栈跟踪:

驱动程序的路径是正确的。为什么我无法启动 IE?

4

0 回答 0