Skip to content

Instantly share code, notes, and snippets.

@SarahElson
Created April 25, 2025 12:07
Show Gist options
  • Save SarahElson/aa8a543ac7a16ca572b6632ed72d4d5c to your computer and use it in GitHub Desktop.
Save SarahElson/aa8a543ac7a16ca572b6632ed72d4d5c to your computer and use it in GitHub Desktop.
What Is New In Selenium 4 And What Is Deprecated In It?
public void test_LambdaTest_drag_drop_demo() throws InterruptedException {
driver.navigate().to("https://www.lambdatest.com/selenium-playground/drag-and-drop-demo");
driver.manage().window().maximize();
try {
Actions action = new Actions(driver);
WebElement source = driver.findElement(By.id("draggable"));
WebElement target = driver.findElement(By.id("droppable"));
action.dragAndDrop(source, target).build().perform();
Thread.sleep(2000);
} catch (Exception e) {
System.out.println(e.getMessage());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment