Bug 279342
| Summary: | [WebDriver][WPE] Track shift status in key sequences | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Lauro Moura <lmoura> |
| Component: | WebDriver | Assignee: | Lauro Moura <lmoura> |
| Status: | NEW | ||
| Severity: | Normal | CC: | bburg |
| Priority: | P2 | ||
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Lauro Moura
The WebDriver spec for sending key sequences[1] states that the implementation should check if a given character is "shifted", that is, usually typed holding the shift key, and insert a shift key press before this character if shift is not already pressed. If the character is not shifted, then the implementation should send a shift release if it's pressed.
For example, the string "a@e" should generate the following interactions:
- Key Down, 'a'
- Key Up, 'a'
- Key Down, 'Shift'
- Key Down, '@'
- Key Up, '@'
- Key Up, 'Shift'
- Key Down, 'e'
- Key Up, 'e'
Currently, the ports implement this separately. For example, Mac explicitly inserts the shift key in `platformSimulateKeySequence()`.
For WPE, somehow this seems to be handled by the old implementation, either in libwpe or in the FDObackend.
In the new WPE API, we correctly translate '@' to the equivalent '2' hardware key, but due to the lack of the shift modifier, the generated WebEvent is '2' instead of '@'.
Patch incoming.
[1] https://w3c.github.io/webdriver/#element-send-keys
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Lauro Moura
Pull request: https://github.com/WebKit/WebKit/pull/33525
Lauro Moura
*** Bug 215588 has been marked as a duplicate of this bug. ***