Join 500+ Software Testing professionals. Solve problem and get your problem solved. Register Now!

0
how to select dropdown in selenium

Solved 1 Answers 48 Views Selenium
0 1
I have a scenario where I am supposed to select drop down. How do I do that?

1 Answer

0
Best answer
0

Try using Select class for the same

 

Select select = new Select(driver.findElement(By.xpath("//path_to_drop_down")));
select.deselectAll();
select.selectByVisibleText("Value1");
answered by

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.
...