Class TouchActions
- Namespace
- OpenQA.Selenium.Interactions
- Assembly
- WebDriver.dll
Provides a mechanism for building advanced interactions with the browser.
public class TouchActions : Actions
- Inheritance
-
TouchActions
- Inherited Members
Constructors
TouchActions(IWebDriver)
Initializes a new instance of the TouchActions class.
public TouchActions(IWebDriver driver)
Parameters
driverIWebDriverThe IWebDriver object on which the actions built will be performed.
Methods
DoubleTap(IWebElement)
Double-taps the touch screen on the specified element.
public TouchActions DoubleTap(IWebElement onElement)
Parameters
onElementIWebElementThe element on which to double-tap.
Returns
- TouchActions
A self-reference to this TouchActions.
Down(int, int)
Presses down at the specified location on the screen.
public TouchActions Down(int locationX, int locationY)
Parameters
locationXintThe x coordinate relative to the view port.
locationYintThe y coordinate relative to the view port.
Returns
- TouchActions
A self-reference to this TouchActions.
Flick(IWebElement, int, int, int)
Flicks the current view starting at a specific location.
public TouchActions Flick(IWebElement onElement, int offsetX, int offsetY, int speed)
Parameters
onElementIWebElementThe element at which to start the flick.
offsetXintThe x offset relative to the viewport.
offsetYintThe y offset relative to the viewport.
speedintThe speed in pixels per second.
Returns
- TouchActions
A self-reference to this TouchActions.
Flick(int, int)
Flicks the current view.
public TouchActions Flick(int speedX, int speedY)
Parameters
speedXintThe horizontal speed in pixels per second.
speedYintThe vertical speed in pixels per second.
Returns
- TouchActions
A self-reference to this TouchActions.
LongPress(IWebElement)
Presses and holds on the touch screen on the specified element.
public TouchActions LongPress(IWebElement onElement)
Parameters
onElementIWebElementThe element on which to press and hold
Returns
- TouchActions
A self-reference to this TouchActions.
Move(int, int)
Moves to the specified location on the screen.
public TouchActions Move(int locationX, int locationY)
Parameters
locationXintThe x coordinate relative to the view port.
locationYintThe y coordinate relative to the view port.
Returns
- TouchActions
A self-reference to this TouchActions.
Scroll(IWebElement, int, int)
Scrolls the touch screen beginning at the specified element.
public TouchActions Scroll(IWebElement onElement, int offsetX, int offsetY)
Parameters
onElementIWebElementThe element on which to begin scrolling.
offsetXintThe x coordinate relative to the view port.
offsetYintThe y coordinate relative to the view port.
Returns
- TouchActions
A self-reference to this TouchActions.
Scroll(int, int)
Scrolls the touch screen to the specified offset.
public TouchActions Scroll(int offsetX, int offsetY)
Parameters
offsetXintThe horizontal offset relative to the view port.
offsetYintThe vertical offset relative to the view port.
Returns
- TouchActions
A self-reference to this TouchActions.
SingleTap(IWebElement)
Taps the touch screen on the specified element.
public TouchActions SingleTap(IWebElement onElement)
Parameters
onElementIWebElementThe element on which to tap.
Returns
- TouchActions
A self-reference to this TouchActions.
Up(int, int)
Releases a press at the specified location on the screen.
public TouchActions Up(int locationX, int locationY)
Parameters
locationXintThe x coordinate relative to the view port.
locationYintThe y coordinate relative to the view port.
Returns
- TouchActions
A self-reference to this TouchActions.