Gestures with Appium 2.0

Hello,

I'm Sai Krishna

Lead Consultant

@saikrisv

saikrishna321

I'm Srinivasan

Lead Consultant

@srinivasanskr

srinivasanTarget

Hello,

I'm Sai Krishna

Lead Consultant

11 years as QA

7 years in TW

Hello,

I'm Sai Krishna

Lead Consultant

QA for 11 yrs

7 years at TW

Automating Gestures

Non Standard Gestures

Map<String, Object> args = new HashMap<>();
args.put("direction", "up");
driver.executeScript("mobile: swipe", args);
args.put("direction", "down");
driver.executeScript("mobile: swipe", args);

mobile: swipe

Map<String, Object> args = new HashMap<>();
args.put("direction", "down");
driver.executeScript("mobile: scroll", args);
args.put("direction", "up");
driver.executeScript("mobile: scroll", args);

mobile: scroll

Map<String, Object> args = new HashMap<>();
args.put("scale", 5);
driver.executeScript("mobile: pinch", args);

mobile: pinch

Map<String, Object> args = new HashMap<>();
args.put("element", ((MobileElement) element).getId());
args.put("x", 2);
args.put("y", 2);
driver.executeScript("mobile: tap", args);

mobile: tap

// double-tap the screen at a specific point
Map<String, Object> args = new HashMap<>();
args.put("x", 100);
args.put("y", 200);
driver.executeScript("mobile: doubleTap", args);

mobile: doubleTap

// two-finger-tap an element (assume element object already
 exists)
Map<String, Object> args = new HashMap<>();
args.put("element", ((MobileElement) element).getId());
driver.executeScript("mobile: twoFingerTap", args);

mobile: twoFingerTap

W3C Action API

Demo

 

@saikrisv

 

saikrisv@thoughtworks.com

 

github.com/saikrishna321

 

 

@srinivasanskr

 

sekars@thoughtworks.com

 

github.com/srinivasantarget

 

Made with Slides.com