01-24-2011 05:02 PM
I'm working on automating the check-in and check-out of items in a process queue, but the process queue is web-based. I can input usernames, lot IDs, passwords, and "press" submit buttons programatically by using ActiveX IWebBrowser2 properties (and related).
Here's what I currently have, mostly stolen from a post from 2005.
The Old Post:
As I said, I can input usernames and passwords and submit the form, but I am having trouble setting the value of a Radio button.
Here's a snippit of what I'm trying, and my VI is attached. I've also attached the relevant HTML.
Solved! Go to Solution.
01-25-2011 08:36 PM
Hello,
Would you mind detailing the difficulties you are having with developing this application?
Thanks,
01-26-2011 10:40 AM
I can't figure out how to change the value of an HTML Radio Button element.
In the HTML, each Radio Button element has the same name, "dBase" in this case, and I tried applying the same logic as one would use when changing the value of an HTML Input element. I tried to set value of IHTMLFormElement "dBase" to "SandBox" (the 2nd option) by using the IHTMLElement SetAttribute invoke node. That didn't work. So then I tried changing which item was "checked" via the same method (what is shown above), but that still didn't work.
I can't think of any other way to set the value of an HTML Radio Button element.
01-26-2011 01:30 PM
@dthor wrote:
I can't figure out how to change the value of an HTML Radio Button element.
In the HTML, each Radio Button element has the same name, "dBase" in this case, and I tried applying the same logic as one would use when changing the value of an HTML Input element. I tried to set value of IHTMLFormElement "dBase" to "SandBox" (the 2nd option) by using the IHTMLElement SetAttribute invoke node. That didn't work. So then I tried changing which item was "checked" via the same method (what is shown above), but that still didn't work.
I can't think of any other way to set the value of an HTML Radio Button element.
You will not be able to check the radio using the "value" of the radio button.
Radios have the following format in HTML:
<input type=radio name="1st Box" value="a">
<input type=radio name="2nd Box" value="b" checked>
<input type=radio name="3rd Box" value="c">
Notice in this case, it would be the 2nd radio that was checked.
However, it is not the value that is checked. In fact, I'm not sure what to set, because it isn't really associated with any particular attribute of that element.
Sorry I can't help figure out what to set, but hopefully that helped show you what not to try
01-26-2011 04:50 PM - edited 01-26-2011 04:50 PM
Thanks Cory,
I've finally figured out a way to do it: get the IHTMLFormElement info by finding "dBase" name, and then find the 2nd (or nth) item with that name and then "Click" that element. The Radio buttons are 0-indexed (or at least LabView reads them that way), so to click on the 2nd item ("SandBox"), I had to put "1" into the index input of the invoke node.
04-26-2013 06:03 AM - edited 04-26-2013 06:06 AM
Hello,
I have a html form compounds in two fields first and last name and a sibmit button, how can I control it in labview
04-29-2013 08:40 AM
jarjsf,
I would recommend creating a new thread for your question as the original question on this thread has already been answered.