Description
Summary
In the current version of our Windows driver based on the WebDriver protocol, we have identified an issue with the actions endpoint, specifically with the KeyDown and KeyUp actions. These actions do not function properly under certain conditions, leading to inconsistent behavior during automated testing.
Steps to Reproduce
- Use the
actions functionality to send a sequence of KeyDown and KeyUp actions.
- Observe that sometimes the keys do not register as pressed (
KeyDown) or released (KeyUp).
Expected Behavior
The KeyDown and KeyUp actions consistently register the pressing and releasing of keys without fail.
Actual Behavior
The KeyDown and KeyUp actions intermittently fail to register, causing automation to be unreliable.
Workaround
A temporary workaround for this issue is to use the sendinputs endpoint. This can be implemented using a monkey patch on the driver or an extension.
Workaround Details
- Endpoint:
POST /user32/session/{session-id}/inputs
- Request Body: An array of scan codes, e.g.,
{ "scanCodes": ["Up", "Down", "Enter", "Esc"] }
By using this endpoint, key inputs can be reliably sent to simulate KeyDown and KeyUp actions.
Environment
- Driver Version: 2024.06.29.7
- Operating System: Windows
- WebDriver Client: Selenium 4.x
Additional Information
- This issue is intermittent and might not be reproducible in all environments.
Description
Summary
In the current version of our Windows driver based on the WebDriver protocol, we have identified an issue with the
actionsendpoint, specifically with theKeyDownandKeyUpactions. These actions do not function properly under certain conditions, leading to inconsistent behavior during automated testing.Steps to Reproduce
actionsfunctionality to send a sequence ofKeyDownandKeyUpactions.KeyDown) or released (KeyUp).Expected Behavior
The
KeyDownandKeyUpactions consistently register the pressing and releasing of keys without fail.Actual Behavior
The
KeyDownandKeyUpactions intermittently fail to register, causing automation to be unreliable.Workaround
A temporary workaround for this issue is to use the
sendinputsendpoint. This can be implemented using a monkey patch on the driver or an extension.Workaround Details
POST /user32/session/{session-id}/inputs{ "scanCodes": ["Up", "Down", "Enter", "Esc"] }By using this endpoint, key inputs can be reliably sent to simulate
KeyDownandKeyUpactions.Environment
Additional Information