The input.releaseActions command of the input module releases any held keys or pressed pointer buttons for a given context and resets the input state for that context. Call it after input.performActions to clean up any inputs left in an intermediate state.
Syntax
{
"method": "input.releaseActions",
"params": {
"context": "5f07e3ca-ecac-465e-b9ef-49000c196ecf"
}
}
Parameters
The params field contains:
context- : A string that contains the ID of the context for which to release inputs. Context IDs are returned by commands such as
browsingContext.getTree.
- : A string that contains the ID of the context for which to release inputs. Context IDs are returned by commands such as
Return value
The result field in the response is an empty object ({}).
Errors
invalid argument- : A required parameter is missing or has an invalid type.
no such frame- : No context with the given context ID is found.
Examples
Releasing all active inputs
With a WebDriver BiDi connection and an active session, send the following message after input.performActions to release all held keys and pointer buttons and reset the input state:
{
"id": 1,
"method": "input.releaseActions",
"params": {
"context": "6B3D5B3A-6571-432B-8E96-E53B5C2ECBB5"
}
}
The browser responds as follows:
{
"id": 1,
"type": "success",
"result": {}
}
Specifications
Browser compatibility
See also
input.performActionscommandinput.setFilescommandinput.fileDialogOpenedevent
来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。
