Table of Contents

Class PointerInputSource

Namespace
WebDriverBiDi.Input
Assembly
WebDriverBiDi.Extensions.dll

A pointer input source, like a mouse, pen, or stylus. Also used for touch actions.

public class PointerInputSource : InputSource
Inheritance
PointerInputSource
Inherited Members

Properties

DeviceKind

Gets the kind of source for this input device.

public override InputSourceKind DeviceKind { get; }

Property Value

InputSourceKind

Methods

CreatePointerDown(PointerButton, PointerActionProperties?)

Creates a pointer down action for simulating the press of a pointer button.

public InputAction CreatePointerDown(PointerButton button = PointerButton.Left, PointerActionProperties? additionalProperties = null)

Parameters

button PointerButton

The button to simulate the press of. Defaults to the "left" (primary) button.

additionalProperties PointerActionProperties

Optional additional properties for the pointer down action. Defaults to null.

Returns

InputAction

The InputAction representing the action.

Exceptions

ArgumentException

Thrown if the pointer type is a touch pointer, and the button is other than the "left" button.

CreatePointerMove(double, double, Origin?, TimeSpan?, PointerActionProperties?)

Creates a pointer move action, simulating the movement of a pointer.

public InputAction CreatePointerMove(double x, double y, Origin? origin = null, TimeSpan? duration = null, PointerActionProperties? additionalProperties = null)

Parameters

x double

The horizontal distance of the move, measured in pixels from the origin point.

y double

The vertical distance of the move, measured in pixels from the origin point.

origin Origin

Optional origin point for the pointer move. Defaults to null, which implies the origin is the browser view port.

duration TimeSpan?

Optional duration for the pointer move. Defaults to null, which implies a zero duration.

additionalProperties PointerActionProperties

Optional additional properties for the pointer move action. Defaults to null.

Returns

InputAction

The InputAction representing the action.

CreatePointerUp(PointerButton)

Creates a pointer up action for simulating the press of a pointer button.

public InputAction CreatePointerUp(PointerButton button = PointerButton.Left)

Parameters

button PointerButton

The button to simulate the press of. Defaults to the "left" (primary) button.

Returns

InputAction

The InputAction representing the action.

Exceptions

ArgumentException

Thrown if the pointer type is a touch pointer, and the button is other than the "left" button.