Table of Contents

Class InputModuleExtensions

Namespace
WebDriverBiDi.Input
Assembly
WebDriverBiDi.Extensions.dll

Provides extension methods for the Input module.

public static class InputModuleExtensions
Inheritance
InputModuleExtensions
Inherited Members

Methods

ClickElementAsync(InputModule, string, SharedReference, TimeSpan?, CancellationToken)

Clicks on the specified element.

public static Task ClickElementAsync(this InputModule module, string browsingContextId, SharedReference elementReference, TimeSpan? timeoutOverride = null, CancellationToken cancellationToken = default)

Parameters

module InputModule

The InputModule to extend.

browsingContextId string

The ID of the browsing context containing the element to click.

elementReference SharedReference

The SharedReference representing the element to be clicked.

timeoutOverride TimeSpan?

The timeout override to use for the command. If omitted, the value of DefaultCommandTimeout is used.

cancellationToken CancellationToken

A token that cancels waiting for the command's response.

Returns

Task

A task representing the asynchronous operation.

PerformActionsAsync(InputModule, string, InputBuilder, TimeSpan?, CancellationToken)

Performs the actions an InputBuilder has built.

public static Task PerformActionsAsync(this InputModule module, string browsingContextId, InputBuilder builder, TimeSpan? timeoutOverride = null, CancellationToken cancellationToken = default)

Parameters

module InputModule

The InputModule to extend.

browsingContextId string

The ID of the browsing context.

builder InputBuilder

The builder.

timeoutOverride TimeSpan?

The timeout override to use for the command. If omitted, the value of DefaultCommandTimeout is used.

cancellationToken CancellationToken

A token that cancels waiting for the command's response.

Returns

Task

A task representing the asynchronous operation.

ReleaseActionsAsync(InputModule, string, TimeSpan?, CancellationToken)

Releases every key and button still pressed by earlier actions, and resets the input state.

public static Task ReleaseActionsAsync(this InputModule module, string browsingContextId, TimeSpan? timeoutOverride = null, CancellationToken cancellationToken = default)

Parameters

module InputModule

The InputModule to extend.

browsingContextId string

The ID of the browsing context.

timeoutOverride TimeSpan?

The timeout override to use for the command. If omitted, the value of DefaultCommandTimeout is used.

cancellationToken CancellationToken

A token that cancels waiting for the command's response.

Returns

Task

A task representing the asynchronous operation.

SendKeysAsync(InputModule, string, string, TimeSpan?, CancellationToken)

Types text into the element that has focus, as a sequence of key presses. To type into a particular element, focus it first, for example with ClickElementAsync(InputModule, string, SharedReference, TimeSpan?, CancellationToken).

public static Task SendKeysAsync(this InputModule module, string browsingContextId, string keysToSend, TimeSpan? timeoutOverride = null, CancellationToken cancellationToken = default)

Parameters

module InputModule

The InputModule to extend.

browsingContextId string

The ID of the browsing context.

keysToSend string

The text to type, which may include special keys from Keys.

timeoutOverride TimeSpan?

The timeout override to use for the command. If omitted, the value of DefaultCommandTimeout is used.

cancellationToken CancellationToken

A token that cancels waiting for the command's response.

Returns

Task

A task representing the asynchronous operation.