internet explorer - Unable to send at sign or curly braces using C# and Selenium -


basically want put following text html input field: {mail@example.com}.

unfortunately: elem.sendkeys("{mail@example.com}") results in 7mailqexample.com0.

on german keyboard layout, 7, q , 0 correspond correct keys, however, looks api not send altgr key beforehand. i've read there problems different keyboard layouts, why tested following code:

elem.sendkeys (keys.leftalt + "q"); // leftalt "normal" alt? elem.sendkeys (keys.alt + "q"); // alt altgr?  elem.sendkeys (keys.leftalt + "2"); // try type '@' english layout elem.sendkeys (keys.alt + "2"); 

unfortunately 4 calls result in empty input control.

what's solution?

side note: happens using internetexplorerdriver (i'm using 32bit driver) (native events enabled). chromedriver able work elem.sendkeys("@") perfectly...

another side note: possible bug in iedriver implementation? when using following snippet instead:

new actions(webdriver).movetoelement(elem).click().perform(); // focus input element sendkeys.sendwait("@"); 

it works...however, doesn't right way...

you ran issue internetexplorerdriver i've reported year ago.

to quote myself issue:

when using native events while require window focus set true, ie-driver use sendinput rather sendmessage api (according http://jimevansmusic.blogspot.com/2013/01/revisiting-native-events-in-ie-driver.html)

it seems ie driver looks keyboard combination setted keyboard layout (german), inputs combination english keyboard layout, or that.

possible workarounds:

  • using english keyboard layout
  • setting requirewindowfocus false (haven't tried 1 myself)
  • comment , star reported issue; maybe fixed :)

Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -