Attempting to use the dragAndDrop
method of Actions
is not functioning properly on the w3schools website:
However, the same code works flawlessly on another page.
Below is the code that was tested:
WebDriver driver = new FirefoxDriver();
driver.get("http://www.w3schools.com/html/html5_draganddrop.asp");
driver.manage().window().maximize();
Actions actions = new Actions(driver);
actions.dragAndDrop(driver.findElement(By.id("div1")), driver.findElement(By.id("div2"))).build().perform();