How to check which option in the dropdown is selected?



How to check which option in the dropdown is selected?..

Answer / 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

More Selenium Interview Questions

Tell us can captcha and bar code reader be automated by using selenium?

1 Answers  


How do you perform drag and drop operation in webdriver?

1 Answers  


How can we move to a particular frame in selenium?

1 Answers  


How much does selenium license cost per client machine?

1 Answers  


Explain xpath absolute and xpath attributes.

1 Answers  


Does the selenium ide have any drawbacks?

1 Answers  


Tell me what kind of mouse actions can be performed in selenium?

1 Answers  


What is webdriver wait in selenium webdriver?

1 Answers  


What are its advantages of pom?

1 Answers  


Write a code snippet to navigate back and forward in browser history?

1 Answers  


What programming languages can you use in selenium rc?

1 Answers  


What are the verification points available in selenium?

1 Answers  


Categories