1

Is it somehow possible to force Selenium2 webdriver sendkeys method to use specific keyboard layout instead of Windows active one in specific testcase?

The issue I ran into is that my default keyboard layout is "Latvian (apostrophe)" (where apostrophe is pressed before accented letters) and

webdriver.findElement(By.name("lastName")).sendKeys("O'Neill");

is actually entered as "OĊ…eill" in the field.

P.S. Couldn't find one, but maybe there's some Selenium2 webdriver method for setting field value as a whole without typing?

mihijs
  • 618
  • 7
  • 16

1 Answers1

0

I did not found any solution also. So my solution actually is, that layout default in my system is English and for specific applications (mail) I switch my keyboard manually to layout which I need (Czech in my case)

See my question here on SO: convert at symbol ("@") to CharSequence

I accepted an answer which was providing good hint for workaround, but it was not working 100%

Community
  • 1
  • 1
Pavel Janicek
  • 14,128
  • 14
  • 53
  • 77