Table of Contents

Class Broker

Namespace
OpenQA.Selenium.BiDi.Communication
Assembly
WebDriver.dll
public sealed class Broker : IAsyncDisposable
Inheritance
Broker
Implements
Inherited Members

Methods

ConnectAsync(CancellationToken)

public Task ConnectAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

Returns

Task

DisposeAsync()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources asynchronously.

public ValueTask DisposeAsync()

Returns

ValueTask

ExecuteCommandAsync<TCommand, TResult>(TCommand, CommandOptions?, JsonTypeInfo<TCommand>, JsonTypeInfo<TResult>)

public Task<TResult> ExecuteCommandAsync<TCommand, TResult>(TCommand command, CommandOptions? options, JsonTypeInfo<TCommand> jsonCommandTypeInfo, JsonTypeInfo<TResult> jsonResultTypeInfo) where TCommand : Command where TResult : EmptyResult

Parameters

command TCommand
options CommandOptions
jsonCommandTypeInfo JsonTypeInfo<TCommand>
jsonResultTypeInfo JsonTypeInfo<TResult>

Returns

Task<TResult>

Type Parameters

TCommand
TResult

SubscribeAsync<TEventArgs>(string, Action<TEventArgs>, SubscriptionOptions?, JsonTypeInfo<TEventArgs>)

public Task<Subscription> SubscribeAsync<TEventArgs>(string eventName, Action<TEventArgs> action, SubscriptionOptions? options, JsonTypeInfo<TEventArgs> jsonTypeInfo) where TEventArgs : EventArgs

Parameters

eventName string
action Action<TEventArgs>
options SubscriptionOptions
jsonTypeInfo JsonTypeInfo<TEventArgs>

Returns

Task<Subscription>

Type Parameters

TEventArgs

SubscribeAsync<TEventArgs>(string, Func<TEventArgs, Task>, SubscriptionOptions?, JsonTypeInfo<TEventArgs>)

public Task<Subscription> SubscribeAsync<TEventArgs>(string eventName, Func<TEventArgs, Task> func, SubscriptionOptions? options, JsonTypeInfo<TEventArgs> jsonTypeInfo) where TEventArgs : EventArgs

Parameters

eventName string
func Func<TEventArgs, Task>
options SubscriptionOptions
jsonTypeInfo JsonTypeInfo<TEventArgs>

Returns

Task<Subscription>

Type Parameters

TEventArgs

UnsubscribeAsync(Subscription, EventHandler)

public Task UnsubscribeAsync(Subscription subscription, EventHandler eventHandler)

Parameters

subscription Subscription
eventHandler EventHandler

Returns

Task