SeleniumHQ / selenium-google-code-issue-archive

Archive, please see main selenium repo
https://github.com/seleniumhq/selenium
346 stars 194 forks source link

SafariDriver: unable to send special Key.chord() sequences or properly enter input values. #8118

Open lukeis opened 8 years ago

lukeis commented 8 years ago

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


lukeis commented 8 years ago

Reported by jmleyba on 2014-10-30 23:32:22

lukeis commented 8 years ago

Reported by luke.semerau on 2015-09-17 17:47:30