Hi Sir,
Please help me, how to automate the Android app intro slider screens in appium.
created
Mar '18
last reply
Mar '18
- 6
replies
- 687
views
- 3
users
- 1
link
Hi Sir,
Please help me, how to automate the Android app intro slider screens in appium.
Thank you for your reply.
I have used the TouchAction class for swipe as below, its working but am looking swipe right from left.
TouchAction ts = new TouchAction(driver);
ts.press(500,700).moveTo(500,-700).release().perform();
Requirements:
Android App intro slider screens - swipe right to left.
Reference: https://www.androidhive.info/2016/05/android-build-intro-slider-app/10
Could you share coordinate values for my requirements.
I have tried but getting error.
Dimension size = driver.manage().window().getSize();
System.out.println(size);
int startx = (int) (size.width * 0.70);
int endx = (int) (size.width * 0.30);
int starty = size.height / 2;
ts.press(startx,starty).moveTo(endx,starty).release().perform();
or
ts.press(endx,starty).moveTo(startx,starty).release().perform();
Error:
Exception in thread “main” org.openqa.selenium.interactions.InvalidCoordinatesException: The coordinates provided to an interactions operation are invalid. (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 0 milliseconds