SendKeys types character very very slow on WindowsServer 2008R2, Windows 8 #3072

Closed
lukeis opened this Issue Mar 3, 2016 · 21 comments

Comments

@lukeis
Member

lukeis commented Mar 3, 2016

Originally reported on Google Code with ID 3072

What steps will reproduce the problem?
Run simple test on Windows Server 2008 R2 with
Driver.FindElement(By.Id("a")).SendKeys("Test").

What is the expected output? What do you see instead?
Text types very slow.
output of nunit-console:
Timeout awaiting keypress: 84
Timeout awaiting keypress: 69
and etc.
with russian characters all's ok. on another machine winServer 2008R2 also.

Selenium version: 2.5.1.0 (tried with 2.15 also)
OS: Windows Server 2008 R2
Browser: Internet Explorer
Browser version: IE8 x64


Reported by lightTheX on 2011-12-16 13:06:25

@lukeis

This comment has been minimized.

Show comment
Hide comment
@lukeis

lukeis Mar 3, 2016

Member

Reported by barancev on 2011-12-26 06:58:52

  • Labels added: Component-WebDriver, Performance
Member

lukeis commented Mar 3, 2016

Reported by barancev on 2011-12-26 06:58:52

  • Labels added: Component-WebDriver, Performance
@lukeis

This comment has been minimized.

Show comment
Hide comment
@lukeis

lukeis Mar 3, 2016

Member

Reported by dawagner on 2012-04-11 14:17:59

  • Status changed: Accepted
  • Labels added: Browser-IE
Member

lukeis commented Mar 3, 2016

Reported by dawagner on 2012-04-11 14:17:59

  • Status changed: Accepted
  • Labels added: Browser-IE
@lukeis

This comment has been minimized.

Show comment
Hide comment
@lukeis

lukeis Mar 3, 2016

Member
I am seeing this too. Any updates?

Reported by shawna.qian on 2012-09-08 19:39:57

Member

lukeis commented Mar 3, 2016

I am seeing this too. Any updates?

Reported by shawna.qian on 2012-09-08 19:39:57

@lukeis

This comment has been minimized.

Show comment
Hide comment
@lukeis

lukeis Mar 3, 2016

Member
You need to use at the 64-bit IEDriverServer.exe if you're using 64-bit IE, or the 32-bit
IEDriverServer if you're using 32-bit IE.

Reported by dawagner on 2012-09-08 23:39:40

Member

lukeis commented Mar 3, 2016

You need to use at the 64-bit IEDriverServer.exe if you're using 64-bit IE, or the 32-bit
IEDriverServer if you're using 32-bit IE.

Reported by dawagner on 2012-09-08 23:39:40

@lukeis

This comment has been minimized.

Show comment
Hide comment
@lukeis

lukeis Mar 3, 2016

Member
I am using 64bit 2.25.3 version.  

Reported by shawna.qian on 2012-09-09 03:23:14

Member

lukeis commented Mar 3, 2016

I am using 64bit 2.25.3 version.  

Reported by shawna.qian on 2012-09-09 03:23:14

@lukeis

This comment has been minimized.

Show comment
Hide comment
@lukeis

lukeis Mar 3, 2016

Member
You need to use the 32 bit version of the IEDriverServer.exe if you are using the 32
bit IE client (which most people do). You may have a 64bit machine but you wouldn't
ordinarily use a 64bit version of IE. Download and use the 32bit version and see.

Matt.

Reported by mattdone on 2012-09-18 06:15:12

Member

lukeis commented Mar 3, 2016

You need to use the 32 bit version of the IEDriverServer.exe if you are using the 32
bit IE client (which most people do). You may have a 64bit machine but you wouldn't
ordinarily use a 64bit version of IE. Download and use the 32bit version and see.

Matt.

Reported by mattdone on 2012-09-18 06:15:12

@lukeis

This comment has been minimized.

Show comment
Hide comment
@lukeis

lukeis Mar 3, 2016

Member
Thanks a lot Matt. I even don't think about that possibility, because Win8 and everything
that connect to this OS is less informative that anything in the world. So I installed
x32 driver and everything go much smoothly and I can see something after login screen
:)

Reported by absolutelynoname08 on 2012-12-05 15:08:48

Member

lukeis commented Mar 3, 2016

Thanks a lot Matt. I even don't think about that possibility, because Win8 and everything
that connect to this OS is less informative that anything in the world. So I installed
x32 driver and everything go much smoothly and I can see something after login screen
:)

Reported by absolutelynoname08 on 2012-12-05 15:08:48

@lukeis

This comment has been minimized.

Show comment
Hide comment
@lukeis

lukeis Mar 3, 2016

Member
Well, I cannot agree on Matt's comment.
His answer is right from point "how it should work" but not "how it is in real" :).
A scenario where I use IEDriver 64bit with IE x64 under Win8 x64 does NOT work as well.
When I use IEDriver x32 with IE x64 + Win8 x64 - works fine though.

So, it looks like IEDriver x64 performance issue.

P.S. Win2008 R2 - same result.

Reported by igor.a.yastrebov on 2013-01-04 11:48:21

Member

lukeis commented Mar 3, 2016

Well, I cannot agree on Matt's comment.
His answer is right from point "how it should work" but not "how it is in real" :).
A scenario where I use IEDriver 64bit with IE x64 under Win8 x64 does NOT work as well.
When I use IEDriver x32 with IE x64 + Win8 x64 - works fine though.

So, it looks like IEDriver x64 performance issue.

P.S. Win2008 R2 - same result.

Reported by igor.a.yastrebov on 2013-01-04 11:48:21

@lukeis

This comment has been minimized.

Show comment
Hide comment
@lukeis

lukeis Mar 3, 2016

Member
Great Thanks Matt!

Reported by ivmax84 on 2013-05-06 11:12:48

Member

lukeis commented Mar 3, 2016

Great Thanks Matt!

Reported by ivmax84 on 2013-05-06 11:12:48

@lukeis

This comment has been minimized.

Show comment
Hide comment
@lukeis

lukeis Mar 3, 2016

Member
I am having this same issue on Windows 7. I have both IE x64 and x86 versions running
on my machine. The same test of sendkeys takes about 2 seconds in x86 but about 25
seconds in x64. It is just setting the word selenium in a google search. This appears
to be a problem with the driver

Reported by thxmike on 2013-08-21 00:07:43

Member

lukeis commented Mar 3, 2016

I am having this same issue on Windows 7. I have both IE x64 and x86 versions running
on my machine. The same test of sendkeys takes about 2 seconds in x86 but about 25
seconds in x64. It is just setting the word selenium in a google search. This appears
to be a problem with the driver

Reported by thxmike on 2013-08-21 00:07:43

@lukeis

This comment has been minimized.

Show comment
Hide comment
@lukeis

lukeis Mar 3, 2016

Member
Same problem. But is seems to be related to the fact that there are either uppercase
& digits types. If only lowercase characters are typed, it goes much faster. 
We use the 32 bits version of the driver on WinXP 32 bits OS , IE 8

Problem with the driver, but these issues (performance on IE) are open since a long
time and are not investigated / fixed. 

It makes Selenium / Webdriver barely unusable for projects that require testing on
IE ...



Reported by jurgen.van.bouchaute on 2013-08-21 06:13:42

Member

lukeis commented Mar 3, 2016

Same problem. But is seems to be related to the fact that there are either uppercase
& digits types. If only lowercase characters are typed, it goes much faster. 
We use the 32 bits version of the driver on WinXP 32 bits OS , IE 8

Problem with the driver, but these issues (performance on IE) are open since a long
time and are not investigated / fixed. 

It makes Selenium / Webdriver barely unusable for projects that require testing on
IE ...



Reported by jurgen.van.bouchaute on 2013-08-21 06:13:42

@lukeis

This comment has been minimized.

Show comment
Hide comment
@lukeis

lukeis Mar 3, 2016

Member

Reported by barancev on 2013-08-21 08:19:29

Member

lukeis commented Mar 3, 2016

Reported by barancev on 2013-08-21 08:19:29

@lukeis

This comment has been minimized.

Show comment
Hide comment
@lukeis

lukeis Mar 3, 2016

Member
Something in the way 64-bit IE processes externally sent mouse and keyboard messages
from the Windows SendMessage API seems to be causing the issue. The IE driver is using
the API correctly. You have three choices when encountering this problem.

First, you can use the 32-bit driver. This should be the correct solution for the vast
majority of cases. Most users end up using 32-bit IE anyway, even if Windows is 64-bit.

Second, you can disable native events. See your language binding documentation for
the exact syntax on how to do this in your preferred language. You will probably sacrifice
some measure of accuracy with element event firing, but it will solve this particular
performance issue.

Third, you can use the "requireWindowFocus" capability. This uses a different method
for simulating mouse and keyboard input, and will likely see better performance. Additionally,
its method of simulation is more accurate than the default IE driver input methods.
The drawback is that the method requires the IE window to be in the foreground, and
the driver will continually attempt to bring IE into the foreground. 

As an aside, and in direct response to comment 11, if you have issues with the driver,
and you are unhappy with the attention your issue appears to be receiving, I remind
you of two things. First, the contributors to the project are largely unpaid volunteers,
and one would do well to remember that when one accuses them of shirking responsibility.
Second, the code to the IE driver, and indeed the entirety of the project is fully
available. There is nothing preventing you from debugging and patching the issue yourself.
We've even made it easier to submit those patches back to the project by mirroring
 it on GitHub, and utilizing its pull request mechanism.

Reported by james.h.evans.jr on 2013-08-21 11:48:56

Member

lukeis commented Mar 3, 2016

Something in the way 64-bit IE processes externally sent mouse and keyboard messages
from the Windows SendMessage API seems to be causing the issue. The IE driver is using
the API correctly. You have three choices when encountering this problem.

First, you can use the 32-bit driver. This should be the correct solution for the vast
majority of cases. Most users end up using 32-bit IE anyway, even if Windows is 64-bit.

Second, you can disable native events. See your language binding documentation for
the exact syntax on how to do this in your preferred language. You will probably sacrifice
some measure of accuracy with element event firing, but it will solve this particular
performance issue.

Third, you can use the "requireWindowFocus" capability. This uses a different method
for simulating mouse and keyboard input, and will likely see better performance. Additionally,
its method of simulation is more accurate than the default IE driver input methods.
The drawback is that the method requires the IE window to be in the foreground, and
the driver will continually attempt to bring IE into the foreground. 

As an aside, and in direct response to comment 11, if you have issues with the driver,
and you are unhappy with the attention your issue appears to be receiving, I remind
you of two things. First, the contributors to the project are largely unpaid volunteers,
and one would do well to remember that when one accuses them of shirking responsibility.
Second, the code to the IE driver, and indeed the entirety of the project is fully
available. There is nothing preventing you from debugging and patching the issue yourself.
We've even made it easier to submit those patches back to the project by mirroring
 it on GitHub, and utilizing its pull request mechanism.

Reported by james.h.evans.jr on 2013-08-21 11:48:56

@lukeis

This comment has been minimized.

Show comment
Hide comment
@lukeis

lukeis Mar 3, 2016

Member
requireWindowFocus don't work for me. After start of browser it dosn't recive focus
on first keyboard input (Clear then SendKeys). Second chain of Clear and SendKeys work
fine.
Env:
IEDriverServer 2.35.3
Windows 8
C#bindings 
Nunit 2.6.2
VS 2012

Reported by imakowski on 2013-09-03 21:06:56

Member

lukeis commented Mar 3, 2016

requireWindowFocus don't work for me. After start of browser it dosn't recive focus
on first keyboard input (Clear then SendKeys). Second chain of Clear and SendKeys work
fine.
Env:
IEDriverServer 2.35.3
Windows 8
C#bindings 
Nunit 2.6.2
VS 2012

Reported by imakowski on 2013-09-03 21:06:56

@lukeis

This comment has been minimized.

Show comment
Hide comment
@lukeis

lukeis Mar 3, 2016

Member
I would say option1 of using 32bit IEdriver is better way to move ahead as it works
in majority of cases. it resolved my issues as discussed above.

Reported by ram.raut on 2013-10-25 11:06:24

Member

lukeis commented Mar 3, 2016

I would say option1 of using 32bit IEdriver is better way to move ahead as it works
in majority of cases. it resolved my issues as discussed above.

Reported by ram.raut on 2013-10-25 11:06:24

@lukeis

This comment has been minimized.

Show comment
Hide comment
@lukeis

lukeis Mar 3, 2016

Member
Issue 6003 has been merged into this issue.

Reported by james.h.evans.jr on 2014-02-04 16:21:26

Member

lukeis commented Mar 3, 2016

Issue 6003 has been merged into this issue.

Reported by james.h.evans.jr on 2014-02-04 16:21:26

@lukeis

This comment has been minimized.

Show comment
Hide comment
@lukeis

lukeis Mar 3, 2016

Member
Even I had faced the same issue but using 32 bit IEDriverServer solved my problem thanks
mattd

Reported by sireeshaeluri on 2014-06-11 10:36:24

Member

lukeis commented Mar 3, 2016

Even I had faced the same issue but using 32 bit IEDriverServer solved my problem thanks
mattd

Reported by sireeshaeluri on 2014-06-11 10:36:24

@lukeis

This comment has been minimized.

Show comment
Hide comment
@lukeis

lukeis Mar 3, 2016

Member
Marking this as a duplicate of issue #5116. The root cause is the same, but that bug
(even though later) has a much fuller, more complete analysis of the problem and what
it would take to resolve it.

Reported by james.h.evans.jr on 2014-08-05 15:14:29

  • Status changed: Duplicate
  • Merged into: #5116
Member

lukeis commented Mar 3, 2016

Marking this as a duplicate of issue #5116. The root cause is the same, but that bug
(even though later) has a much fuller, more complete analysis of the problem and what
it would take to resolve it.

Reported by james.h.evans.jr on 2014-08-05 15:14:29

  • Status changed: Duplicate
  • Merged into: #5116
@lukeis

This comment has been minimized.

Show comment
Hide comment
@lukeis

lukeis Mar 3, 2016

Member
Same issue is still there as of today, after 4 years (changing engine to x86 == all
OK, x64 == superslow).

Reported by markkondor on 2015-02-27 11:35:59

Member

lukeis commented Mar 3, 2016

Same issue is still there as of today, after 4 years (changing engine to x86 == all
OK, x64 == superslow).

Reported by markkondor on 2015-02-27 11:35:59

@lukeis

This comment has been minimized.

Show comment
Hide comment
@lukeis

lukeis Mar 3, 2016

Member
Use IE 32 with IE10 32 bit work properly.

Reported by nick@webon.net on 2015-05-06 08:22:32

Member

lukeis commented Mar 3, 2016

Use IE 32 with IE10 32 bit work properly.

Reported by nick@webon.net on 2015-05-06 08:22:32

@lukeis

This comment has been minimized.

Show comment
Hide comment
@lukeis

lukeis Mar 3, 2016

Member

Reported by luke.semerau on 2015-09-17 18:14:24

  • Labels added: Restrict-AddIssueComment-Commit
Member

lukeis commented Mar 3, 2016

Reported by luke.semerau on 2015-09-17 18:14:24

  • Labels added: Restrict-AddIssueComment-Commit

@lukeis lukeis closed this Mar 3, 2016

@SeleniumHQ SeleniumHQ locked and limited conversation to collaborators Mar 4, 2016

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.