Issue
I'm using Seleniunm to test my webpage.
I have a dropdown box that I want to select an option for. This fires off some Ajax that gets some data for the relevant units.
This works fine when I view the page normally, but with selenium it changes the option in the text box but the Ajax isn't triggered.
Markup on page:
<select id="measure" name="measure">
<option selected="selected" value="1">Metric</option>
<option value="2">US Imperial</option>
<option value="3">UK Imperial</option>
</select>
C# code:
var dropDown = WebDriver.FindElementById("measure");
var selectElement = new SelectElement(dropDown);
selectElement.SelectByValue("3");
What am I missing in terms of selecting/clicking the dropdown option?
Thanks
Solution
I used the FirefoxDriver instead of the InternetExplorer Driver and all seems fine now.
Answered By - big_tommy_7bb
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.