LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Contrôler une page Web avec Labview

Bonjour a tous,

 

J'ai un syteme embarqué avec un moteur php.

Je me connecte a ce service web via mon browser (chrome) et j'aimerai interagir avec les commandes (boutons/URL ) de cette page web.

Est ce possible?

 

I have a embedded board with a php engine .
I connect to this web service through my browser (Chrome) and I'd like to interact with the controls (buttons / URL) of the web page.
ICan I do that?

 

Thanks All

0 Kudos
Message 1 of 8
(2,607 Views)

There are several ways you can interact with a web page through LabVIEW. You can use the HTTP VIs (Data Communication -> Protocols -> HTTP Client) to send requests to web pages and get the HTML back. You can also embed an Internet Explorer window in your VI and control it through ActiveX (this may also be possible with other browsers, I don't know). A third approach is to use AutoIT which can click buttons and read text in almost any program. You can find examples of all three approaches on this forum. One place to start is this thread: http://forums.ni.com/t5/LabVIEW/Control-website/td-p/1635524

0 Kudos
Message 2 of 8
(2,593 Views)

I try the Activex Solution.It work fine exept the GetAttribut function...i'vn't any response of the property node for this one...

I'm not "fan" of the AutoIt solution..If i understood correctly it work with mouse position and  in the event of a graphical update.....Smiley Frustrated

0 Kudos
Message 3 of 8
(2,559 Views)

@Lag66 wrote:

I try the Activex Solution.It work fine exept the GetAttribut function...i'vn't any response of the property node for this one...


You need to go through the HTML to find the elements for which you want to retrieve data. If you post your LabVIEW code, the HTML document (or a link to it, if it is publicly accessible), and a more detailed description of what data you need, someone from the forum might be able to help, but your best bet is to spend some time working through it on your own. If you're working with a large, complex web page, start with a simple one (you can even use a local file on your hard drive) and see if you can retrieve data from that; then move on to the more complicated site that has the data you want

0 Kudos
Message 4 of 8
(2,544 Views)

Thanks for your answer .

I past some time in this application and it working fine now.

I've just a problem with a "Submit" node for my "Envoyer" button

Submit fonction work fine only when i connect node reference to a Element reference an not when i connect it to the "Envoyer" formElement Reference.

I suppose that the fonctional "Submit " it a general Web page submit , i think it dosn't work if i have some button in the same page.

This is the code of the button to validate (envoyer)

Code_of_submit_button.PNG

This code work fine but the "inactive" part don't work fine

code2.PNG

 

0 Kudos
Message 5 of 8
(2,534 Views)

The reason the disabled part does not work is because "Submit" is an action on an entire form, not on a single button. When you click the "Envoyer" button, it triggers the "Submit" action for the entire form, which is also the same thing that your working code does. There is no meaning to performing a "Submit" action on the "Envoyer" button alone.

0 Kudos
Message 6 of 8
(2,520 Views)

So, if i understand, you mean(if we forget my mistake) that whenever a button is clicked on a page, a full submit of this page is made and there is not meaning to performing a "submit"  just for a button​​?

0 Kudos
Message 7 of 8
(2,512 Views)

It doesn't do a full submit of the entire page; it submits the form to which the button is attached. There could be other forms within the same page (which would have their own submit buttons or triggers).

 

Submitting a button on its own doesn't do anything - it's not equivalent to clicking on the button. Rather, clicking on the form's submit button triggers the same action as calling the Submit method on the entire form.

0 Kudos
Message 8 of 8
(2,498 Views)