Table of Contents

Class WheelInputDevice

Namespace
OpenQA.Selenium.Interactions
Assembly
WebDriver.dll

Represents a wheel input device, such as a mouse wheel.

public class WheelInputDevice : InputDevice
Inheritance
WheelInputDevice
Inherited Members

Constructors

WheelInputDevice()

Initializes a new instance of the WheelInputDevice class.

public WheelInputDevice()

WheelInputDevice(string)

Initializes a new instance of the WheelInputDevice class, given the device's name.

public WheelInputDevice(string deviceName)

Parameters

deviceName string

The unique name of this input device.

Properties

DeviceKind

Gets the type of device for this input device.

public override InputDeviceKind DeviceKind { get; }

Property Value

InputDeviceKind

Methods

CreateWheelScroll(IWebElement, int, int, int, int, TimeSpan)

Creates a wheel scroll action beginning with an element.

public Interaction CreateWheelScroll(IWebElement target, int xOffset, int yOffset, int deltaX, int deltaY, TimeSpan duration)

Parameters

target IWebElement

The IWebElement in which to begin the scroll.

xOffset int

The horizontal offset from the center of the target element from which to start the scroll.

yOffset int

The vertical offset from the center of the target element from which to start the scroll.

deltaX int

The distance along the X axis to scroll using the wheel.

deltaY int

The distance along the Y axis to scroll using the wheel.

duration TimeSpan

The duration of the scroll action.

Returns

Interaction

The Interaction representing the wheel scroll.

CreateWheelScroll(CoordinateOrigin, int, int, int, int, TimeSpan)

Creates a wheel scroll action.

public Interaction CreateWheelScroll(CoordinateOrigin origin, int xOffset, int yOffset, int deltaX, int deltaY, TimeSpan duration)

Parameters

origin CoordinateOrigin

The coordinate origin, either the view port or the current pointer position, from which to begin the scroll.

xOffset int

The horizontal offset from the center of the origin from which to start the scroll.

yOffset int

The vertical offset from the center of the origin from which to start the scroll.

deltaX int

The distance along the X axis to scroll using the wheel.

deltaY int

The distance along the Y axis to scroll using the wheel.

duration TimeSpan

The duration of the scroll action.

Returns

Interaction

The Interaction representing the wheel scroll.

CreateWheelScroll(int, int, TimeSpan)

Creates a wheel scroll action.

public Interaction CreateWheelScroll(int deltaX, int deltaY, TimeSpan duration)

Parameters

deltaX int

The distance along the X axis to scroll using the wheel.

deltaY int

The distance along the Y axis to scroll using the wheel.

duration TimeSpan

The duration of the scroll action.

Returns

Interaction

The Interaction representing the wheel scroll.

ToDictionary()

Returns a value for this input device that can be transmitted across the wire to a remote end.

public override Dictionary<string, object> ToDictionary()

Returns

Dictionary<string, object>

A Dictionary<TKey, TValue> representing this action.