selenium icon indicating copy to clipboard operation
selenium copied to clipboard

3.5.0 Grid - Selenium Keys / Unicode Failing

Open thomhurst opened this issue 9 years ago • 9 comments

When using the Selenium Grid 3.5.0 then Selenium Keys is failing.

element.sendKeys(Keys.TAB); is instead sending a question mark '?' An issue with sending unicode over the grid maybe e.g. "\ue004"

Using the latest ChromeDriver 2.31

thomhurst avatar Aug 15 '17 15:08 thomhurst

I'm also able to reproduce this with 3.5.0 grid, Firefox 54.0.1, and client-combined-3.5.0-nodeps.jar, and using Microsoft Edge in the same grid setup.

sgtjim avatar Aug 15 '17 16:08 sgtjim

Are the grid node and your tests running on the same OS?

shs96c avatar Aug 16 '17 09:08 shs96c

Reproducible with Selenium Grid 3.5.1 .NET and Chrome 60 / chromedriver 2.31.

These failures are occurring on two different configurations of Grid:

Grid running Windows 2012r2 with remote Nodes running Windows 10 Grid running Windows 10 with a Node running on the same machine Windows 10

Prior to 3.5.1 this XPATH worked OK //ul[@class='currency-list']//li[contains(.,'$')] however after upgrading to 3.5.1 I get an element not found exception Unable to locate element: {"method":"xpath","selector":"//ul[@class='currency-list']//li[contains(.,'�')]"}.

This appears to be an issue only with the Grid server. A local instance of 3.5.1 works OK and raises an expected failure of Unable to locate element: {"method":"xpath","selector":"//ul[@class='currency-list']//li[contains(.,'£')]"}

ghost avatar Aug 16 '17 09:08 ghost

@shs96c Yes, for me they're both running on Windows 10. I didn't deploy the update to our Windows Server 2012r2 instances until I had made sure things like this weren't things like this.

sgtjim avatar Aug 16 '17 12:08 sgtjim

I'm seeing the same thing. I have a test where I'm entering this string:

♒ берегам ἐξκοισαφῆ तान्यहानि 有朋自遠方來 àéî ¥€®¶¢£¤§Þ﷼ ╬ This is a unicode test.

but the remote Chrome browser is showing this:

? ??????? ????????? ????????? ?????? ��� ���������? ? This is a unicode test.

I'm currently testing against a grid where the hub and node are running Selenium 3.5. My test code itself is using the 3.5.1 .NET bindings. Both the hub and node are running Windows 10. Running these tests locally without the grid results in the correct string being typed into the field. The problem only happens when using the grid.

Also, when using a full 3.3 grid setup, this works fine.

bjharo avatar Aug 21 '17 15:08 bjharo

We've found the root cause and fixed it by 9be6e6eacd15c44faf2c8704f73b662f84cdd31e

Until the next release you can use a workaround: start hub with explicit setting of file.encoding property:

java -Dfile.encoding=UTF-8 -jar selenium-server-standalone-3.5.0.jar -role hub

barancev avatar Aug 22 '17 14:08 barancev

Thanks for the update and fix @barancev

thomhurst avatar Aug 22 '17 15:08 thomhurst

Version 3.5.3 released with this fix.

barancev avatar Aug 29 '17 15:08 barancev

bug #4523 which has been marked as duplicate of this bug still exists in selenium 3.5.3 (IEDriver sends the wrong keys with german keyboard setting).

mseele avatar Sep 05 '17 13:09 mseele