Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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