adspace


How do perform drag and drop using webdriver?

Answer Posted / Jitendra Rathore

To perform a drag-and-drop operation using Selenium WebDriver, you can use the `Actions` class. Here is an example for dragging an element with id 'draggable' to an element with id 'droppable':n```javanWebElement draggable = driver.findElement(By.id("draggable"));nWebElement droppable = driver.findElement(By.id("droppable"));nActions action = new Actions(driver);naction.dragAndDrop(draggable, droppable).build().perform();n```

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Have you created any framework?

1039


What’s selenese?

920


How can you fetch an attribute from an element? How to retrieve typed text from a textbox?

1197


what will be the first salary and what will be the hike in the salary?

929


Do you know how to locate a link using its text in selenium?

986