input.releaseActions command

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

json
{
  "method": "input.releaseActions",
  "params": {
    "context": "<contextId>"
  }
}

Parameters

The params field contains:

context

A string that contains the ID (UUID) of the context for which to release inputs. Context IDs are returned by commands such as browsingContext.getTree.

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:

json
{
  "id": 1,
  "method": "input.releaseActions",
  "params": {
    "context": "6B3D5B3A-6571-432B-8E96-E53B5C2ECBB5"
  }
}

The browser responds as follows:

json
{
  "id": 1,
  "type": "success",
  "result": {}
}

Specifications

Specification
WebDriver BiDi
# command-input-releaseActions

Browser compatibility

See also