我在尝试在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);
}