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
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
buttonPointerButtonThe button to simulate the press of. Defaults to the "left" (primary) button.
additionalPropertiesPointerActionPropertiesOptional 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
xdoubleThe horizontal distance of the move, measured in pixels from the origin point.
ydoubleThe vertical distance of the move, measured in pixels from the origin point.
originOriginOptional origin point for the pointer move. Defaults to null, which implies the origin is the browser view port.
durationTimeSpan?Optional duration for the pointer move. Defaults to null, which implies a zero duration.
additionalPropertiesPointerActionPropertiesOptional 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
buttonPointerButtonThe 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.