-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Form.fill() doesn't clear text inputs before calling sendKeys() #65
Comments
Yes, because the I'd suggest taking an approach of sending N number of backspace symbols (N is number of symbols currently in that field) and then actual new string. Beware that you need to send both BACKSPACE (for Windows/Linux) and DELETE (for Mac) symbols for that to work. Working example in PHP: https://github.com/Behat/MinkSelenium2Driver/blob/master/src/Behat/Mink/Driver/Selenium2Driver.php#L667 |
That's a nice trick, I didn't think of that. |
If you call Since real user will only get |
Trick with backspaces is even nicer than I thought! :) |
It's up to you I guess. PR are welcome. By the way in my PHP implementation of HtmlElements I've decided to remove that IF statement by |
If input with type 'text' or 'password' already has value Form.fill() will append to it, not replace.
Form.java, lines 71-73
The text was updated successfully, but these errors were encountered: