Home > Programming, QA, Test and Automation Stuffs > Selendroid Mobile Gestures

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

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

%d bloggers like this: