Skip to content

Instantly share code, notes, and snippets.

@SarahElson
Created April 25, 2025 12:10
Show Gist options
  • Save SarahElson/49f11813569489252d23b32dacc93d7b to your computer and use it in GitHub Desktop.
Save SarahElson/49f11813569489252d23b32dacc93d7b 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_keyDown_keyUp_demo() {
driver.navigate().to("https://www.google.com/");
driver.manage().window().maximize();
try {
Actions action = new Actions(driver);
WebElement inputBox = driver.findElement(By.name("q"));
action.keyDown(inputBox, Keys.SHIFT)
.sendKeys("selenium")
.keyUp(inputBox, Keys.SHIFT)
.build()
.perform();
} 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