Alright, I have a Webbrowser which has a page opened. I want it to select a specific Option from the Combobox. How can I do that in VB ?
HTML Code:
<select name="Protected">
<option value="NC"></option>
<option value="ON">ON (protected)</option>
<option value="OFF">OFF (unprotected)</option>
</select>
VB Code:
For Each element As HtmlElement In Me.WebBrowser1.Document.All("Protected").GetElementsByTagName("option")
If element.GetAttribute("OFF") = "OFF (unprotected)" Then
element.SetAttribute("selected", True)
Exit For
Next
I tried it but it doesn't seem to work. What am I doing wrong?
Thanks in advance.