-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
sendKeys(" ") does not check checkbox #777
Comments
It’s not supposed to be possible to select a checkbox using the high-level |
This is not very intuitive. Both variants of sendKeys() methods should have the same functionality. Have you any reference to a standard/spec where it is defined that this should not work? |
Also sprach Philip Lonsing:
This is not very intuitive. Both variants of sendKeys() methods should
have the same functionality.
Whilst they may appear to do the same thing, the high-level Element Send
Keys command is a do-as-I-mean shorthand which also runs a number of
checks, such as ensuring it is keyboard-interactable, scrolling it into
view, focussing it, &c.
The low-level variant that is part of the actions API, consists of
the two primitives keyUp and keyDown, to achieve the same effect.
Effectively you will run [keyDown(<spacebar pua>), keyUp(<spacebar
pua>)].
Have you any reference to a standard/spec where it is defined that
this should not work?
At least in Chrome this works fine.
Chrome does not implement the specification.
|
This issue has been automatically locked since there has not been any recent activity after it was closed. If you have run into an issue you think is related, please open a new issue. |
Platform and application details
Windows 10 Creators Update
Firefox: 54.0 (beta)
Selenium: 3.4 (Java)
Steps to reproduce
Run the following Java Selenium test.
It will fail with
java.lang.AssertionError: checkbox is selected after pressing SPACE
A simple test page with a checkbox with the id "checkBox" is used:
https://mdn.mozillademos.org/en-US/docs/Web/HTML/Element/input/checkbox$samples/Basic_example
geckodriver-log_sendKeysSpaceToCheckbox.txt
The text was updated successfully, but these errors were encountered: