面对通过IE11浏览器上的Jenkins(远程)执行Selenium脚本的速度缓慢

时间:2019-05-21 11:29:12

标签: selenium selenium-webdriver internet-explorer-11 iedriverserver selenium-remotedriver

我在尝试在IE11上远程执行我的Selenium脚本时遇到了缓慢 但是,这与本地执行相对来说是可以的

硒版本:3.141 IE驱动程序:3.14.0

我正在从事医疗项目,支持的浏览器是IE。请提出如何解决此问题的建议?

功能:

    private static WebDriver getInternetExplorerDriver(String driverpath) {
        if (driverpath.endsWith(".exe")) {
            System.setProperty("webdriver.ie.driver", driverpath);
        } else {
            System.setProperty("webdriver.ie.driver", driverpath + "IEDriverServer.exe");
        }
        capabilities.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS, true);
        capabilities.setCapability("ignoreZoomSetting", true);
        capabilities.setCapability(InternetExplorerDriver.INITIAL_BROWSER_URL, "");
        capabilities.setCapability("requireWindowFocus", true);
        capabilities.setCapability(InternetExplorerDriver.NATIVE_EVENTS, false);
        capabilities.setCapability("unexpectedAlertBehaviour", "accept");
        capabilities.setCapability("ignoreProtectedModeSettings", true);
        capabilities.setCapability("disable-popup-blocking", true);
        capabilities.setCapability("enablePersistentHover", true);

        return new InternetExplorerDriver(capabilities);
    }

0 个答案:

没有答案