Currently, I am in the process of utilizing Webdriver with Java. My goal is to retrieve the selected value from a combobox without relying on the Select class provided by Webdriver.
The specific markup that I am dealing with is as follows:
<select name="cmbStateName">
<option value="MH">Maharashtra</option>
<option value="HR">Harayana</option>
<option value="MP">Madhya Pradesh</option>
</select>
It's important to note that I am unable to make any modifications to the current markup. My preference for avoiding the Select class is rooted in my desire to streamline the test process using pure Java and direct interaction with the Markup. Rather than resorting to Javascript, I aim to extract the value through Core Java methods.