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:
I had the same issue. I ended up calling sendkeys inside a loop until the correct value was inserted. Here's what I did:
WebElement name = driver.findElement(By.xpath(...));
this.sendkeys(name,"yourValue");
private void sendkeys(WebElement ele, String val) throws
InterruptedException
{ ele.clear();
while(true)
{ ele.sendKeys(val);
if(ele.getAttribute("value").equals(val))
break;
else
{ ele.clear();
Thread.currentThread();
Thread.sleep(3000);
}
}
Thread.currentThread();
Thread.sleep(3000);
}
Hope this helps.