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
driver
IWebDriverThe 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
onElement
IWebElementThe 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
locationX
intThe x coordinate relative to the view port.
locationY
intThe 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
onElement
IWebElementThe element at which to start the flick.
offsetX
intThe x offset relative to the viewport.
offsetY
intThe y offset relative to the viewport.
speed
intThe 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
speedX
intThe horizontal speed in pixels per second.
speedY
intThe 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
onElement
IWebElementThe 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
locationX
intThe x coordinate relative to the view port.
locationY
intThe 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
onElement
IWebElementThe element on which to begin scrolling.
offsetX
intThe x coordinate relative to the view port.
offsetY
intThe 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
offsetX
intThe horizontal offset relative to the view port.
offsetY
intThe 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
onElement
IWebElementThe 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
locationX
intThe x coordinate relative to the view port.
locationY
intThe y coordinate relative to the view port.
Returns
- TouchActions
A self-reference to this TouchActions.