In Node.js javascript, on hungarian keyboard, the @ sign in sendKeys has replaced with the content of clipboard. If you try to replace "@" width its unicode value "\u0040", the result is same, the sendKeys has has replaced with the content of clipboard, even though try to the tricky Key.chord( Key.ALT, "v", Key.NULL ) form, it does nothing.
// if clipboard contains XXX
WebElement email=driver.findElement(By.xpath("//div[@class='auth-container']//input[@type='text']");
email.sendKeys("sample@sample.com")
// result: field content is sampleXXXsample.com
If you put @ sign on the clipboard, it works well, but you cant guarantee the content of clipboard in test automation. There is a way, to send keys to the active item.
I would avoid to fill the field with javascript, as mentioned above, because javascript fill it directly, does not care with the field status, fill it with value even though the field is inactive, do not triggers events, etc, javascript is brute force fill the field.
Send. Keys. There is a npm package for it. It is a wrapper for powershell sendkeys, so works only on windows.
npm install -g sendkeys
and the test code:
const sendkeys = require( 'sendkeys');
WebElement email=driver.findElement(By.xpath("//div[@class='auth-container']//input[@type='text']");
email.sendKeys("sample")
// result: cursor is in the field, field contains 'sample'
sendkeys.sync( "@sample.com" )
// result: field content is 'sample@sample.com'