Skip to content

Instantly share code, notes, and snippets.

@ultimate-qa2
Created February 24, 2021 15:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ultimate-qa2/79e08def5e111ad7a718d9b39402840a to your computer and use it in GitHub Desktop.
Save ultimate-qa2/79e08def5e111ad7a718d9b39402840a to your computer and use it in GitHub Desktop.
Basic web element interactions performed with Selenium WebDriver in Java
driver.findElement(By.id(“sign-in”)).click();
driver.findElement(By.id(“session_email”)).click();
WebElement email = driver.findElement(By.id(“session_email”));
email.sendKeys("sauce@example.com");
WebElement email = driver.findElement(By.id(“session_password”));
email.sendKeys("password");
driver.findElement(By.tagName(“form”)).submit();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment