LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to click a button using activex webbrowser??

Hello

 

i am trying to click on the"generate Ephemeris" button using the activex webbrowser container.

see the webpage

http://ssd.jpl.nasa.gov/horizons.cgi

 

Using this code, it just click on the seach button. I tried to change the index number but still clicking the "search button".

 

What i am doing wrong???

 

 

codigo.JPG

0 Kudos
Message 1 of 12
(5,058 Views)

any ideas???

0 Kudos
Message 2 of 12
(5,029 Views)

This is counter-intuitive, but use the "name" field rather than the "index" field for the "item" invoke node. This assumes IE8 or later. MS changed the way that method works. Also:

  • You should make sure that page has actually loaded before you try to access it. In other words, you will need some sort of wait after the "Navigate" method.
  • You should not create a Greedy Loop .
0 Kudos
Message 3 of 12
(5,017 Views)

Thanks smercurio_fc

 

I tried before using the "name" field rather than the "index" field extracted from the html web page code with negative results. I used the name "go" and also "Generate Ephemeris" or "submit".

 

<form method="post" action="http://ssd.jpl.nasa.gov/horizons.cgi#results" enctype="multipart/form-data"><input type="submit" name="go" value="Generate Ephemeris" /></form>

I AM STUCK!!!!!

 

In the first frame of the sequence, i load the page, the second has a time delay of 5s

codigo.JPG

0 Kudos
Message 4 of 12
(5,005 Views)

No, I meant actually connect the numeric value of 1 to the "name" field, rather than the "index" field. That will index out the correct form. The "To Variant" is optional in this case since the invoke node will perform an implicit data conversion of integer to variant.

0 Kudos
Message 5 of 12
(4,999 Views)

Instead of using a wait, you may want to check that the web browser has finished loading the page as shown in the snippet below:

Go To URL.png

0 Kudos
Message 6 of 12
(4,985 Views)

Thank you guys.

if  I connect the value of 0 to the "name"field, it works perfectly and goes to the seach page, but when the value is 1 nothing happens (doesn´t work)

Smercurio_fc, did you run this vi on your computer??

 

codigo.JPG

 

0 Kudos
Message 7 of 12
(4,977 Views)

If you want others to test your code, upload the code, or at least a snippet.  You can't expect that someone else will recreate your work from a screenshot in order to help you.

0 Kudos
Message 8 of 12
(4,973 Views)
0 Kudos
Message 9 of 12
(4,968 Views)

Well, that web page is doing something I don't understand and don't have time to investigate, but I hope someone else will have a solution.  In the meanwhile, any chance you can use the telnet interface?

 

Also, a LabVIEW style note: you should close ALL ActiveX references, including those that you create by converting from a variant, in the opposite order from the order in which you opened them.

0 Kudos
Message 10 of 12
(4,965 Views)