selenium-google-code-issue-archive
selenium-google-code-issue-archive copied to clipboard
SafariDriver: unable to send special Key.chord() sequences or properly enter input values.
Originally reported on Google Code with ID 8118
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).
Reported by PredatorVI
on 2014-10-30 23:07:16
- _Attachment: [Login.htm](https://storage.googleapis.com/google-code-attachments/selenium/issue-8118/comment-0/Login.htm)_
Reported by jmleyba
on 2014-10-30 23:32:22
- Labels added: Component-WebDriver, Browser-Safari
Reported by luke.semerau
on 2015-09-17 17:47:30
- Labels added: Restrict-AddIssueComment-Commit