我需要在多个IE11浏览器中同时执行Selenium脚本,
Browsers are launched successfully
,但在执行以下操作时
- 点击操作
- 从选择框中选择元素(不是选择元素)
系统的物理光标移动到该元素。因此,在启动IE11 browers
的多个实例时会发生故障。
以下是启动浏览器之前设置的InternetExplorerOptions
InternetExplorerOptions IEOptions = new InternetExplorerOptions();
DesiredCapabilities desCapabilities = new DesiredCapabilities();
desCapabilities.setPlatform(Platform.ANY);
desCapabilities.setBrowserName(DriverConstants.IE_BROWSER);
desCapabilities.setCapability(InternetExplorerDriver.REQUIRE_WINDOW_FOCUS, true);
desCapabilities.setCapability(InternetExplorerDriver.IGNORE_ZOOM_SETTING, true);
desCapabilities.setCapability(InternetExplorerDriver.NATIVE_EVENTS,false);
desCapabilities.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS, true);
desCapabilities.setCapability(InternetExplorerDriver.INITIAL_BROWSER_URL,"https://www.google.com");
desCapabilities.setCapability(InternetExplorerDriver.ELEMENT_SCROLL_BEHAVIOR,true);
desCapabilities.setCapability(InternetExplorerDriver.ENABLE_PERSISTENT_HOVERING,false);
IEOptions.merge(desCapabilities);
操作系统:Windows服务器,Windows 10
硒版本:3.13.0
IE驱动程序版本:最新
请有人对此加以说明,以避免在自动化时通过IE11浏览器使用系统光标。