1

I got to know that we have different ways for performing DragAndDrop in Webdriver which i am not aware off,

Can any help me what are they and which one is the best approach.

Even same code for draganddrop is not working around all browser some times, does any have idea for this?

Thanks in Advance

  • http://stackoverflow.com/questions/14210051/how-to-automate-drag-drop-functionality-using-selenium-web-driver – olyv Dec 13 '13 at 17:31

1 Answers1

1

Try this code

driver=new FirefoxDriver();
                 Actions act=new Actions(driver);
                 driver.navigate().to("http://dev.css-zibaldone.com/onwebdev/post/jquery-drag-and-drop.html");
                 driver.manage().timeouts().pageLoadTimeout(25,TimeUnit.SECONDS);
                 WebElement drag=driver.findElement(By.id("draggable"));
                 WebElement drop=driver.findElement(By.id("droppable"));


                 act.dragAndDrop(drag,drop).perform();
Ajay
  • 395
  • 1
  • 4
  • 11