Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

How check the selected value in dropdown?

How do you handle Select type of dropdown?
    - If it is <select> we would have to use Select class from Selenium.
    - Methods to select from dropdown:
    Select s = new Select(element);
        - s.selectByVisibleText
        - s.selectByValue
        - s.selectByIndex 
--> How do we verify which option is selected in a dropdown?
    - If we want to get the currently selected option, 
    we use getFirstSelectedOption() method.
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #How #check #selected
ADD COMMENT
Topic
Name
9+6 =