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
stringThe unique name of this input device.
Properties
DeviceKind
Gets the type of device for this input device.
public override InputDeviceKind DeviceKind { get; }
Property Value
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
IWebElementThe IWebElement in which to begin the scroll.
xOffset
intThe horizontal offset from the center of the target element from which to start the scroll.
yOffset
intThe vertical offset from the center of the target element from which to start the scroll.
deltaX
intThe distance along the X axis to scroll using the wheel.
deltaY
intThe distance along the Y axis to scroll using the wheel.
duration
TimeSpanThe 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
CoordinateOriginThe coordinate origin, either the view port or the current pointer position, from which to begin the scroll.
xOffset
intThe horizontal offset from the center of the origin from which to start the scroll.
yOffset
intThe vertical offset from the center of the origin from which to start the scroll.
deltaX
intThe distance along the X axis to scroll using the wheel.
deltaY
intThe distance along the Y axis to scroll using the wheel.
duration
TimeSpanThe 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
intThe distance along the X axis to scroll using the wheel.
deltaY
intThe distance along the Y axis to scroll using the wheel.
duration
TimeSpanThe 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.