- Lyshco
- Posts : 1
Join date : 2012-03-27
Help, webdriver sendKeys is very very slow
Tue Mar 27, 2012 12:09 pm
Hi All,
We have about 800 Java test cases written in Selenium 1 and we are migrating across to Selenium 2. In selenium 1 to fill in a text field we used the following function:
This has since been changed to the following for WebDriver
However, when we run up the tests with the new syntax they are terribly slow. In Selenium 1 pages were filled out in an instant. However with Selenium 2 we can actually see the text being typed into each field.
I am just wondering is there any way we can speed up the selenium 2 tests? Is there something different to sendKeys() that we can use?
We have about 800 Java test cases written in Selenium 1 and we are migrating across to Selenium 2. In selenium 1 to fill in a text field we used the following function:
- Code:
protected void typeAndBlur(String key, String value)
{
selenium.type(key, value);
selenium.fireEvent(key, "blur");
}
This has since been changed to the following for WebDriver
- Code:
protected void typeAndBlur(String fieldId, String value)
{
WebElement elem = driver.findElement(By.id(fieldId));
elem.clear();
elem.sendKeys(value);
}
However, when we run up the tests with the new syntax they are terribly slow. In Selenium 1 pages were filled out in an instant. However with Selenium 2 we can actually see the text being typed into each field.
I am just wondering is there any way we can speed up the selenium 2 tests? Is there something different to sendKeys() that we can use?
- qappbcAmateur
- Posts : 38
Join date : 2011-10-13
Re: Help, webdriver sendKeys is very very slow
Wed Mar 28, 2012 10:39 am
http://stackoverflow.com/questions/3526361/firefoxdriver-how-to-disable-javascript-css-and-make-sendkeys-type-instantly
I hope this helps, -Phil
I hope this helps, -Phil
- ThomasG
- Posts : 1
Join date : 2013-08-03
Re: Help, webdriver sendKeys is very very slow
Sun Aug 04, 2013 12:48 am
"Very Slow": In may case sendKeys() took about 5 second per letter.
Context: Windows 7, Internet Explorer 64 Bit, selenium-server-standalone-2.33.0.jar, IEDriverServer.exe, 64-Bit.
For some reason WebDriver activates a 32-Bit Version of the Internet Explorer, which is also installed on my system and which is not compatible with the 64-Bit-WebDriver.
So I switched to the 32-Bit-Version of IEDriverServer.exe and everything is fine.
Pity, that the well-meant Driver doesn't find it's Browser.
Context: Windows 7, Internet Explorer 64 Bit, selenium-server-standalone-2.33.0.jar, IEDriverServer.exe, 64-Bit.
For some reason WebDriver activates a 32-Bit Version of the Internet Explorer, which is also installed on my system and which is not compatible with the 64-Bit-WebDriver.
So I switched to the 32-Bit-Version of IEDriverServer.exe and everything is fine.
Pity, that the well-meant Driver doesn't find it's Browser.
- Difference between sendkeys and sendkey in selenium webdriver
- Why is that the first sendKeys is always ignored in a consecutive sendKeys
- sendkeys is not working for file upload
- I downloaded and installed Selenium WebDriver Jar files in my Eclipse, but still i am facing issues and couldn't run the webdriver scripsts.
- HtmlSuite in webdriver
Permissions in this forum:
You cannot reply to topics in this forum
|
|