|
-
Jan 2nd, 2012, 04:05 PM
#1
Thread Starter
New Member
RESOLED: Radiobox
Is there any way to automaticly check a option in a radiobox(in a browser) if it has no id in it?
In my application I have a webbrowser which automaticly goes to a .html file that has the following script:
Code:
<html><form><input type="radio" class="radio" name="d" value="2" checked="checked">abc
<br>
<input type="radio" class="radio" name="d" value="3">def
<br>
<input type="radio" class="radio" name="d" value="4">ghi</form></html>
Also there is a button and when I click it it should select the option 'ghi'. Now most solutions I found use the id in the input. But in this input there isn't any id.
Anyone knows how to do this?
Last edited by brue; Jan 2nd, 2012 at 05:53 PM.
-
Jan 2nd, 2012, 04:16 PM
#2
Re: Radiobox
Only a guess with out the url.
vb Code:
For Each element As HtmlElement In Me.wb.Document.GetElementsByTagName("input") If element.GetAttribute("value") = "ghi" Then element.InvokeMember("click") End If Next
-
Jan 2nd, 2012, 04:35 PM
#3
Thread Starter
New Member
Re: Radiobox
You truely are AWESOME Been looking for this all day long. Only note was that the value had to be 4 instead of ghi, but that was something I could figure out myself
-
Jan 2nd, 2012, 04:37 PM
#4
Re: Radiobox
You are very much correct it is 4. That was my miss take only glancing at the code.
Please mark the thread resolved from the thread tools menu
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|