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
moduleInputModuleThe InputModule to extend.
browsingContextIdstringThe ID of the browsing context containing the element to click.
elementReferenceSharedReferenceThe SharedReference representing the element to be clicked.
timeoutOverrideTimeSpan?The timeout override to use for the command. If omitted, the value of DefaultCommandTimeout is used.
cancellationTokenCancellationTokenA 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
moduleInputModuleThe InputModule to extend.
browsingContextIdstringThe ID of the browsing context.
builderInputBuilderThe builder.
timeoutOverrideTimeSpan?The timeout override to use for the command. If omitted, the value of DefaultCommandTimeout is used.
cancellationTokenCancellationTokenA 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
moduleInputModuleThe InputModule to extend.
browsingContextIdstringThe ID of the browsing context.
timeoutOverrideTimeSpan?The timeout override to use for the command. If omitted, the value of DefaultCommandTimeout is used.
cancellationTokenCancellationTokenA 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
moduleInputModuleThe InputModule to extend.
browsingContextIdstringThe ID of the browsing context.
keysToSendstringThe text to type, which may include special keys from Keys.
timeoutOverrideTimeSpan?The timeout override to use for the command. If omitted, the value of DefaultCommandTimeout is used.
cancellationTokenCancellationTokenA token that cancels waiting for the command's response.
Returns
- Task
A task representing the asynchronous operation.