0

I have tried with below coding for swipe a page.But,it doesn't works for me.How can i make a swipe?

       //Swipe Right to Left side of the Media Viewer
        WebElement pages = driver.findElement(By.id("media-container"));
        TouchActions flick = new TouchActions(driver).flick(pages, -100, 0, 0);
        flick.perform();
        sleep(1000);


        //Swipe Left to Right side of the Media Viewer
         WebElement page = driver.findElement(By.id("media-content"));
         TouchActions flicks = new TouchActions(driver).flick(page, -100, 0, 0);
         flicks.perform();
         sleep(7000);
selvi
  • 1,271
  • 2
  • 21
  • 41
  • Why are you calling `sleep()` immediately after? Is that so that the user can't flick again right away? One is set for 1 second and the other is set for 7 seconds. Not totally sure, but that sleep statement could be interfering with the flick action. – hasherr Feb 23 '15 at 04:10
  • k thanks i will try it by removing sleep – selvi Feb 23 '15 at 07:40
  • @hasherr I have tried by removing sleep ,but it doesn't work at all. – selvi Feb 23 '15 at 07:47

0 Answers0