Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to handle drag and drop functionality through selenium webdriver ?

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 501
    Comment on it

    We use "Actions" class to handle drag and drop functionality.

    WebDriver driver = new FirefoxDriver();
    driver.get("http://jqueryui.com/resources/demos/droppable/default.html");
    
    driver.manage().timeouts().implicitlyWait(20L, TimeUnit.SECONDS);
    driver.manage().window().maximize();
    
    WebElement draggable = driver.findElement(By.xpath("//*[@id='draggable']"));
    WebElement droppable = driver.findElement(By.xpath("//*[@id='droppable']"));
    
    Actions action = new Actions(driver);
    action.dragAndDrop(draggable, droppable).perform();
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: