I have tried with below codings for swiping a mobile pages.
While running the test case, the swipe action doesn't occurs and i am also not getting any error message.
3.How can I swipe on both side from left to right and vice-versa.
1. //Swipe Right to Left side of the Media Viewer First Page
WebElement firstPages = driver.findElement(By.id("media-list"));
TouchActions flick = new TouchActions(driver).flick(firstPages,-100,0,0);
flick.perform();
2. //perform swipe gesture
TouchActions swipe = new TouchActions(driver).flick(0, -20);
swipe.perform();
Here is my code to flick pages and it is working fine for me
You can flick in both sides by just changing the sign of the x-parameter whose value is 500 here.