Selenium Java - Handling Form Elements
Given the following dropdown HTML:
What will be the selected option after executing:
<select id="colors"> <option value="r">Red</option> <option value="g">Green</option> <option value="b">Blue</option> </select>
What will be the selected option after executing:
Select select = new Select(driver.findElement(By.id("colors")));
select.selectByValue("g");