Finding elements using attributes selector

By: Slav Kurochkin

Finding elements using attributes selector

WebElement userName = driver.findElement(By.cssSelector("input[name=username]"));
WebElement menuButton = driver.findElement(By.cssSelector("img[alt='menuButton']"));
View Comments

Leave a Comment

Use markdown or basic HTML and be nice.