Selenium version: 2.43.1
OS: Windows 7 Enterprise
Browser: Safari
Browser version: 5.1.7
I have a login page with an input field in a web application for username and password.
When using SafariDriver and submitting credentials:
username_input.clear();
username_input.sendKeys(username);
password_input.clear();
password_input.sendKeys(password);
return clickSubmit();
it is failing (only in Safari) with "Please enter your username". This error is only
shown when NO value is entered. For some reason it doesn't detect the input value
event though I can actually see it in the browser. Calling:
String user = username_input.getAttribute("value");
successfully returns the correct value. So in an attempt to work around it, I was
trying to do a brute force clearing of the field by doing:
username_input.sendKeys(Keys.chord(Keys.CONTROL, "a"));
username_input.sendKeys(Keys.DELETE);
username_input.sendKeys(username);
However, the field doesn't get cleared and the character "a" is left in the username_input
field.
I've attached the raw HTML but it uses a lot of JavaScript (knockoutJS).
Originally reported on Google Code with ID 8118
Reported by
PredatorVI
on 2014-10-30 23:07:16