From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Auto login to sites like yahoo, gmail...intranet sites..etc etc without user intervention

Hi,
i am new to internet applications in labview
..and i was trying to implement auto login to websites...(preferebly intranet sites )..
please help me in the approach ..i shd log on to the site without any user intervention(even i shd not open browser to type the URL!!)..and pass user name and password!!
Is it possible in labview internet toolkit..or shd i need to go 4 any other platform??
expecting ur reply
bye
vevek
0 Kudos
Message 1 of 29
(7,295 Views)
Vevek,
 
There is a way to do this using ActiveX and internet explorer.  This does require some research into what the HTML for that web page is actually doing though.  If you place the Web Browser ActiveX control on the front panel, you can set up a series of calls that will navigate to the web page of interest, then wait (time depending on the quality of the internet connection) then access the document property.  That will output a variant, which you will need to convert to a document reference by using the Variant to Data functions and the document ActiveX constant (right-click and select an ActiveX class).  This document reference can then be used to load the forms method.  This can be then used to get the specific form you would like, you need the element item, then the form element item, then you can set the attribute.  Once you have done that you can submit the form and then close the reference to the browser.  This is how I did it for Google, and searched for "testing".
 
 
Hope this helps!
Andy F.

Message Edited by Andy F. on 12-02-2005 05:23 PM

-----------------------------------------------------------------
National Instruments
0 Kudos
Message 2 of 29
(7,278 Views)
Hi Andy F,
 
Any chance you can submit that Vi, or email that vi to me?, Ive tried and tried but cant seem to find some of the "things" you have on your diagram, mainly the IHTML Document thingy.
 
Cheers
 
Raj
0 Kudos
Message 3 of 29
(7,214 Views)

Hey Andy,

Thats the nice solution and i am also finding the problrm that Raj is facing, isnt it possible that you can attach the vi you have creatd, so that we can analyse it by run it, it is more understandable for me other then anybody.

Hope for the positive reply.

Thanks,

Nishant

0 Kudos
Message 4 of 29
(7,190 Views)
Andy,
thank u very much..
 
i have some doubts in ur implementation..
in the IHTMLElement collection what does "f" mean as a name string?and in the IHTLForm element what does "q" mean as a namestring? and what does the strattribute name in IHTML Element("value") mean??
did you get these strings form the HTML soruce code of the "google page" ..if so please explain me the same. i have attached the HTML soruce code of google page also!!
 
i have one application where i should login with a password to an intranet website..(just enter the password and press login button..but it should be done like your implmentation in background automatically)
 
i have attached the source code of the HTML page of my web page and also the HTML page..for your reference
 
how to identify the "f" ,"q" and "value" strings for my implemention?
 
note: all the files are attached in zip format
Thanks & Regards,
Vevek..
 
 
 
0 Kudos
Message 5 of 29
(7,171 Views)

Andy,

Some of the things i tried for my implementation was..

i used "LOGIN" as the string for the IHTMLElementCollection for ""name"

but when i debugged with the help of probe the output of IHTMLElementCollection showed me value->0.

then i got an error..

the "LOGIN" string which i used was from the HTML code of the web page.It was given in the HTML page

<FORM name=LOGIN action="login.htm" method="post">
<input type="hidden" name="page" value="login">
<input type="hidden" name="GetTimeVal">
<td width=30>&nbsp;</td>
so i used the form name as the string.

But for the other two (IHTML Form element and IHTML element ) I dont know what do pass as string values form the

HTML code.

Please correct me if i am wrong

 

regards

vevek

0 Kudos
Message 6 of 29
(7,171 Views)
Hi pondy,
the source of your login page looks a bit confusing but I think you should be alright if you use Andy's VI and just replace "f" with "Login" , "q" with "URL" and "testing" with your password.
0 Kudos
Message 7 of 29
(7,157 Views)

thanks ravis..

but the problem is i have a html pages in frames ..i mean there are 3 frames are put into a html page!!! unlike google.com where there is only 1 html page.

when i call the url what i get is the main frame and under that there are 3 frames ...

i need one of the 3 frames and search for a form and submit the form!!!

Andy, is it possible to select a particular frame in html page and search  a form in that frame and submit it.

 

i have attached all the html files of my application in zip format!!

regards

vevek

 

0 Kudos
Message 8 of 29
(7,134 Views)

Hi Andy,

You could see lots of mails in the forum reg this auto login issues.

I have said in my previous post that i have 3 frames of which i need one of the frame and in that frame i have the form where i should login..in labview we have

functions in ActiveX which can take frames from html page..but how to use those functions ..i mean the IHTML properties!!

could you please suggest me a way of doing the following in an automated way ..

1. login to a html page

2, get the frame which has the form for login(depending on the frame name. We would know it from the html code)

3. fill the form and press submit button

regards

Vevek

0 Kudos
Message 9 of 29
(7,119 Views)
Due to popular request, here is the VI that I used, saved in LabVIEW 7.1.  To create the references that I used, I just copied the Web Browser, changed it to a constant, then right-clicked and selected the class taht I wanted.  Knowing which class to use is a bit of an experiment sometimes, so don't be discouraged!  It looks like from the source that you used, that the login.htm link is going to be the URL that you would need to browse to, since that is where the form that you are looking for is referring to.  From there you need to figure out what the form elements name is, and then which button will execute the submit button. 
 
Hope this helps!
Andy F.
-----------------------------------------------------------------
National Instruments
0 Kudos
Message 10 of 29
(7,107 Views)