Skip to content
This repository was archived by the owner on Nov 29, 2018. It is now read-only.

IEDriver: Can't type characters like '[' when Windows keyboard layout isn't set to English #6540

Open
lukeis opened this issue Mar 4, 2016 · 5 comments

Comments

@lukeis
Copy link
Member

lukeis commented Mar 4, 2016

Originally reported on Google Code with ID 6540

What steps will reproduce the problem?
1. Set your Windows keyboard layout to German as default
2. Start a Internet Explorer Driver with both REQUIRE_WINDOW_FOCUS and NATIVE_EVENTS
enabled
3. Use sendKeys with "special" characters like '@', '[' or ']'

What is the expected output? What do you see instead?
Input: "@ [ ]"
Expected Output: "@ [ ]"
Actual Output: "q 8 9"


Selenium version: 2.32.0, 2.37.0
OS: Windows 7 Professional SP1 x64
Browser: Internet Explorer 8
==================================================

When using native events while require window focus is set to true, IE-Driver will
use SendInput rather than SendMessage API (according to http://jimevansmusic.blogspot.com/2013/01/revisiting-native-events-in-ie-driver.html)

It seems that IE Driver looks for the keyboard combination with the setted keyboard
layout (German), but inputs this combination with an English keyboard layout, or something
like that.

-> IE wants to type '['
-> IE wants to type the character with following combination: Alt Gr + 8
-> IE sends this key sequence: Alt Gr down, 8 down, 8 up, Alt Gr up
-> This does result in typing an '8' rather than the wanted '['

If we set our default keyboard layout to English, IE Driver types the correct characters.
This is also our temporary workaround.


A short Eclipse example project is attached - just add the referenced (but excluded)
library 'selenium-server-standalone-2.37.0.jar' to the build path.

Reported by markus.moeslinger on 2013-11-07 13:29:38


- _Attachment: [IEDriverKeyboardLayout.zip](https://storage.googleapis.com/google-code-attachments/selenium/issue-6540/comment-0/IEDriverKeyboardLayout.zip)_
@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Could be a possible duplicate of the following issue:
https://code.google.com/p/selenium/issues/detail?id=5673

Reported by markus.moeslinger on 2013-11-07 13:30:45

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Reported by barancev on 2013-11-20 08:02:29

  • Labels added: Browser-IE

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

i can reproduce this issue by sending a backslash with german keyboard layout and require_window_focus
true with 2.39. result is a "ß".

without window focus it works

maybe similar to http://code.google.com/p/selenium/issues/detail?id=7108

Reported by padder784 on 2014-05-15 14:22:58

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Update: This issue is still reproducable with InternetExplorerDriver 2.43.0

Reported by markus.moeslinger on 2014-10-08 10:56:36

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Reported by luke.semerau on 2015-09-17 17:45:56

  • Labels added: Restrict-AddIssueComment-Commit

@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.
Projects
None yet
Development

No branches or pull requests

1 participant