TDH*_*DHM 54 selenium internet-explorer selenium-webdriver
我正在IE 11浏览器上运行我的一个脚本,Selenium 2.43.1
当脚本在文本字段中键入时使用以下内容:
element.sendKeys("string");
Run Code Online (Sandbox Code Playgroud)
在IE浏览器中,我可以看到字符串中的一个字符在文本字段中键入,并且在键入下一个字符之前等待1-2秒.键入一个字符的方法需要1-2秒.
Mas*_*ave 50
我的问题在于驱动程序架构,并通过下载和使用32位解决方案来修复它.
要切换到32位,这就是你需要做的
InterExplorerWeDriver使用InternetExplorerDriverService具有32位驱动程序服务路径的类来实例化您的类
.
InternetExplorerDriver ieDiver = new InternetExplorerDriver(“Path to the 32 bit Explorer driver”);
或者如果使用构建器:
System.setProperty(“webdriver.ie.driver”,“C:\\drivers\\IEDriverServer.exe”);
DesiredCapabilities ieCapabilities=DesiredCapabilities.internetExplorer();
ieCapabilities.setCapability(InternetExplorerDriver
.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS,true);
ieCapabilities.setCapability("requireWindowFocus", true);
File ie_temp=newFile(“C:\\Selenium\\IEDrivertemp”);
InternetExplorerDriverService.Builder
ies=newInternetExplorerDriverService.Builder();
ies.withExtractPath(ie_temp);
InternetExplorerDriverService service=ies.build();
WebDriver driver=newInternetExplorerDriver(service,ieCapabilities))
Run Code Online (Sandbox Code Playgroud)
帮助我解决的线索
http://forumsqa.com/question/typing-too-slow-in-text-fields-while-replaying-tests/
小智 32
对我来说,它适用于64位版本的IEDriverServer.我添加了属性requireWindowFocus"true"值:
DesiredCapabilities capabilities = DesiredCapabilities.internetExplorer();
capabilities.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS, true);
...
capabilities.setCapability("requireWindowFocus", true);
WebDriver driver = new InternetExplorerDriver(capabilities);
Run Code Online (Sandbox Code Playgroud)
我正在使用Selenium/IE驱动程序的2.47版本
Mar*_*cus 17
对于64位WebDriver:
对于32位WebDriver:
奇怪的是:
我的设置:Windows 10,IE 11,64位,Selenium 3.4
Dem*_*ave 11
这有点让我加快了速度.IEDriverServer 2.53.1
InternetExplorerOptions options = new InternetExplorerOptions();
options.IntroduceInstabilityByIgnoringProtectedModeSettings = true;
options.RequireWindowFocus = true;
driver = new InternetExplorerDriver(options);
Run Code Online (Sandbox Code Playgroud)
小智 6
您可以更改为32位版本,但如果需要64位,则可以尝试此解决方案:
这导致在64位IE上不再输入蜗牛.
| 归档时间: |
|
| 查看次数: |
66619 次 |
| 最近记录: |