06-25-2014 09:37 AM
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
06-25-2014 11:16 AM
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
06-30-2014 01:30 AM
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.....
06-30-2014 11:40 AM
@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
07-01-2014 03:49 AM - edited 07-01-2014 03:49 AM
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)
This code work fine but the "inactive" part don't work fine
07-01-2014 12:19 PM
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.
07-02-2014 01:20 AM - edited 07-02-2014 01:25 AM
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?
07-02-2014 10:02 AM
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.