I am developing framework for selenium automation and I have got stuck to get the dropdown option's value using dropdown. I have dropdown option but now I want the value of same dropdown. Is it possible to get it in selenium.
For example:
Here is the Html tag:
<select id="periodId" name="period" style="display: none;">
<option value="week1">1</option>
<option value="week2">2</option>
<option value="week3">3</option>
<option value="week4">4</option>
<option value="week5">5</option>
<option value="week16">6</option>
</select>
Now in the framework which I have developed, I will pass the dropdown option '5', now I want the value of dropdown option '5'. Is that possible to get value 'week5' for dropdown option '5' using selenium?