sendkeys安装包,Chrome浏览器驱动程序使用Selenium sendkeys功能

Selenium sendkeys with Chrome Driver drops character "2" and "4". Other characters are OK. When I use other browser (IE or FF), everything is OK.

code:

WebElement name = driver.findElement(localizator);

name.clear();

name.sendKeys("1234567890 abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ");

result: input box is filled with

13567890 abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ

Characters 2 and 4 are missing, other characters are filled correctly.

I use Windows 7 64bit, Chrome version 29.0.1547.57 m, ChromeDriver win32 (v2.2.215849.dyu) - the newest one.

解决方案

Investigating you are from Czech Republic also, I am going to make wild assumption, that your keyboard is set up to Czech as default.

I also had some strange issues with sendKeys when my system had Czech keyboard as default one. Since I changed default to English, the problems dissapeared.

If this does not help, please provide info what is going to happen if you try this:

name.sendKeys("2");

name.sendKeys("22222222");

name.sendKeys("4");

name.sendKeys("44444444");

name.sendKeys("424242");

你可能感兴趣的:(sendkeys安装包)