here is the method for doing drag and drop operation on mozilla
Create Driver for any Browser(Mozilla)
Go to the URL
Create an Action object for Driver
Fetch and create WebElement object for the SOURCE element.
Fetch and create WebElement object for the DESTINATION element.
6.Perform ACTION.
a.Click and Hold the source WebElement.
b.Move to destination WebElement.
c.Release the Element.
Here is the code for handling drag and drop operation through web driver
WebDriver driver = new FirefoxDriver();
driver.get("http://www.evontech.com/examples/dragdrop/");
driver.manage().timeouts().implicitlyWait(3,TimeUnit.MINUTES);
Actions act = new Actions(driver);
WebElement src = driver.findElement(By.xpath("//div[@id='items']/div[1]"));
WebElement des = driver.findElement(By.id("trash"));
act.clickAndHold(src).build().perform();
act.moveToElement(des).build().perform();
act.release(des).build().perform();
0 Comment(s)