Input

Represents commands and events related to the Input module (simulated user input). Described in https://w3c.github.io/webdriver-bidi/#module-input.

Constructor

new Input()

Methods

(async) perform(browsingContextId, actions) → {Promise}

Performs the specified actions on the given browsing context.

Parameters:
NameTypeDescription
browsingContextIdstring

The ID of the browsing context.

actionsArray

The actions to be performed.

Returns:

A promise that resolves with the response from the server.

Type: 
Promise

(async) release(browsingContextId) → {Promise}

Resets the input state in the specified browsing context.

Parameters:
NameTypeDescription
browsingContextIdstring

The ID of the browsing context.

Returns:

A promise that resolves when the release actions are sent.

Type: 
Promise

(async) setFiles(browsingContextId, element, files) → {Promise.<void>}

Sets the files property of a given input element.

Parameters:
NameTypeDescription
browsingContextIdstring

The ID of the browsing context.

elementstring | ReferenceValue

The ID of the element or a ReferenceValue object representing the element.

filesstring | Array.<string>

The file path or an array of file paths to be set.

Throws:

If the element is not a string or a ReferenceValue.

Type
Error
Returns:

A promise that resolves when the files are set.

Type: 
Promise.<void>