How do you perform drag and drop operation in webdriver?
Answer / Sanjay Kumar Chaubey
To perform a drag and drop operation in Selenium WebDriver, you need to use Actions class. Here's an example for dragging an element from one location to another:
```
Actions action = new Actions(driver);
WebElement source = driver.findElement(By.id("source"));
WebElement target = driver.findElement(By.id("target"));
action.dragAndDrop(source, target).build().perform();
```
| Is This Answer Correct ? | 0 Yes | 0 No |
What are the main advantages of selenium?
Why to use testng with selenium rc?
How to export selenium ide test suite to selenium rc suites?
What are the important features of selenium ide?
How are selenium ide, webdriver and selenium rc different from each other?
How do I start the browser using WebDriver?
Explain what is the difference between find elements () and find element ()?
How do you clear the contents of a textbox in selenium?
What is exception test in selenium?
What is selenium webdriver?
What could be the cause of selenium webdriver test to fail?
How you can login into any site if it’s showing any authentication popup for password and username?