Saturday 1 February 2014

DragandDrop using WebDriver

Example Scenario for    DragandDrop :

@Test
    public void droppable() {
        driver.get("http://jqueryui.com/demos/droppable/");

        WebElement draggable = driver.findElement(By.id("draggable"));
        WebElement droppable = driver.findElement(By.id("droppable"));
        new Actions(driver).dragAndDrop(draggable, droppable).build().perform();
    }

No comments:

Post a Comment