Search
 
 

Display results as :
 


Rechercher Advanced Search

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

Help, webdriver sendKeys is very very slow

View previous topic View next topic Go down

Help, webdriver sendKeys is very very slow

Post by Lyshco on 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:

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?

Lyshco

Posts : 1
Join date : 2012-03-27

Back to top Go down

Re: Help, webdriver sendKeys is very very slow

Post by qappbc on 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

qappbc
Amateur
Amateur

Posts : 38
Join date : 2011-10-13

Back to top Go down

Re: Help, webdriver sendKeys is very very slow

Post by ThomasG on 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.

ThomasG

Posts : 1
Join date : 2013-08-03

Back to top Go down

Re: Help, webdriver sendKeys is very very slow

Post by Sponsored content Today at 3:24 am


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum