adspace
How to check which option in the dropdown is selected?
Answer Posted / Shweta Dixit
To find out which option is currently selected in a dropdown, you can use the getSelectedOption() method:nnseleniumDriver.findElement(By.<locator>).getSelectedOption().getText();
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers