- I need to automate swipe gesture for both side(Right To Left and Left to Right) in iOS mobile app.
- I am using appium version 1.4.8 , iOS simulator 6 and platform version as 8.3.
- I am writing test cases using java language.
- I have tried with below coding for swipe gestures. But, the swipe action doesn't happens for me.
public void swipeLeftToRight(AppiumDriver driver) {
Dimension size = driver.manage().window().getSize();
int endx = (int) (size.width * 0.8);
int startx = (int) (size.width * 0.20);
int starty = size.height / 2;
driver.swipe(startx, starty, endx, starty, 1000);
}public void swipeRightToLeft(AppiumDriver driver) { Dimension size = driver.manage().window().getSize(); int startx = (int) (size.width * 0.8); int endx = (int) (size.width * 0.10); int starty = size.height / 2; driver.swipe(startx, starty, endx, starty, 1000); }
created
Aug '15
last reply
Apr '17
- 11
replies
- 6.8k
views
- 9
users
- 2
likes