I have the following snippet of code for combo box/drop down:
<select id="color">
<option value="">Select color</option>
<option value="1">Blue</option>
<option value="2">Green</option>
<option value="3">Red</option>
If I select Blue then Blue is displayed in a combo/drop down. I would like to get the text between the tags using Selenium 2 (WebDriver) using Java for checking against the selected value displayed in the combo box. How can I get the text from the selected value of the combo box?