Hi Guys,
I’m appium newbie,am trying to swipe from right to left
Appium:1_4_16
Java-client: 4.1.2
Selenium server standalone: 3.4.0
My test passes but im not able to swipe further need a dynamic way of swiping
Code:
@Test
public void InstallAppPlaceOrder() throws InterruptedException
{
sRootDir = System.getProperty("user.dir");
sPropFile = sRootDir + "//capabilities.properties";
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;
System.out.println("startx = " + startx + " ,endx = " + endx + " , starty = " + starty);
driver.swipe(startx, starty, endx, starty, 3000);
Thread.sleep(2000);
}
Console:
(540, 888)
startx = 378 ,endx = 162 , starty = 444
PASSED: InstallAppPlaceOrder