Selendroid Mobile Gestures

Mobile Gestures

Selendroid is implementing the Advanced User Interactions API. This is a new, more comprehensive API for describing actions a user can perform on an app. This includes actions such as drag and drop or clicking multiple elements while holding down the Control key.

 

Supported Interactions

  • doubleTap(WebElement onElement)
  • down(int x, int y)
  • flick(int xSpeed, int ySpeed)
  • flick(WebElement onElement, int xOffset, int yOffset, int speed)
  • longPress(WebElement onElement)
  • move(int x, int y)
  • singleTap(WebElement onElement)
  • up(int x, int y)

 

Example

How to swipe from right to left

Java:

#Please import:Β org.openqa.selenium.interactions.touch.TouchActions

WebElement pages = driver.findElement(By.id("vp_pages"));
TouchActions flick = new TouchActions(driver).flick(pages, -100, 0, 0);
flick.perform();

Fonts: http://selendroid.io/gestures.html

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.