Table of Contents

Class Module

Namespace
WebDriverBiDi
Assembly
WebDriverBiDi.dll

Base class representing a module in the WebDriver BiDi protocol.

public abstract class Module
Inheritance
Module
Derived
Inherited Members

Constructors

Module(IBiDiModuleHost)

Initializes a new instance of the Module class.

protected Module(IBiDiModuleHost driver)

Parameters

driver IBiDiModuleHost

The driver used for communication by the module.

Properties

Driver

Gets the driver used for communication by the module.

protected IBiDiModuleHost Driver { get; }

Property Value

IBiDiModuleHost

ModuleName

Gets the module name.

public abstract string ModuleName { get; }

Property Value

string

Methods

RegisterObservableEvent<T>(ObservableEventInvocable<T>)

Registers an event so that when it is received, the deserialized data is forwarded directly to the given ObservableEvent<T>. Use this overload when the deserialized type T is the same as the event args type.

protected void RegisterObservableEvent<T>(ObservableEventInvocable<T> observableEvent) where T : WebDriverBiDiEventArgs

Parameters

observableEvent ObservableEventInvocable<T>

The ObservableEvent<T> to notify when the event is received.

Type Parameters

T

The type of event args, which must also be the deserialized event data type.

RegisterObservableEvent<T, TEventArgs>(ObservableEventInvocable<TEventArgs>, Func<T, TEventArgs>)

Registers an event so that when it is received, the deserialized data is converted using the provided factory and forwarded to the given ObservableEvent<T>. Use this overload when the deserialized type T differs from the event args type TEventArgs.

protected void RegisterObservableEvent<T, TEventArgs>(ObservableEventInvocable<TEventArgs> observableEvent, Func<T, TEventArgs> eventArgsConverter) where TEventArgs : WebDriverBiDiEventArgs

Parameters

observableEvent ObservableEventInvocable<TEventArgs>

The ObservableEventInvocable<T> to notify when the event is received.

eventArgsConverter Func<T, TEventArgs>

A function that creates a TEventArgs from the deserialized data.

Type Parameters

T

The deserialized event data type.

TEventArgs

The event args type to produce and forward.