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
deviceNamestringThe unique name of this input device.
Exceptions
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
targetIWebElementThe IWebElement in which to begin the scroll.
xOffsetintThe horizontal offset from the center of the target element from which to start the scroll.
yOffsetintThe vertical offset from the center of the target element from which to start the scroll.
deltaXintThe distance along the X axis to scroll using the wheel.
deltaYintThe distance along the Y axis to scroll using the wheel.
durationTimeSpanThe duration of the scroll action.
Returns
- Interaction
The Interaction representing the wheel scroll.
Exceptions
- ArgumentNullException
If
targetis null.
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
originCoordinateOriginThe coordinate origin, either the view port or the current pointer position, from which to begin the scroll.
xOffsetintThe horizontal offset from the center of the origin from which to start the scroll.
yOffsetintThe vertical offset from the center of the origin from which to start the scroll.
deltaXintThe distance along the X axis to scroll using the wheel.
deltaYintThe distance along the Y axis to scroll using the wheel.
durationTimeSpanThe 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
deltaXintThe distance along the X axis to scroll using the wheel.
deltaYintThe distance along the Y axis to scroll using the wheel.
durationTimeSpanThe 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.