Checkout our demo site to practice selenium https://magento.softwaretestingboard.com/

0 like 0 dislike
183 views
in Selenium by
recategorized by
I have a scenario where I am supposed to select drop down. How do I do that?

1 Answer

0 like 0 dislike
by
 
Best answer

Try using Select class for the same

 

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


This site is for software testing professionals, where you can ask all your questions and get answers from 1300+ masters of the profession. Click here to submit yours now!

...