Navigate an url passing as parameters user_id and password

Navigate an url passing as parameters user_id and password

Postby MarcoBoschi » Mon Oct 11, 2010 9:35 am

Hi,
when I run this code

#include "fivewin.ch"

FUNCTION MAIN( )
LOCAL oIe

oIe = CREATEOBJECT( "InternetExplorer.Application" )

oIe:Navigate( "http://172.28.2.240" )

oIe:Visible = .T.

RETURN NIL
this dialog appears

Image

The questions are:
is it possible to automatically to send user_id and password?
is it possible to connect my software to an Url without the usage of Internet Explorer?

Thanks
Marco
User avatar
MarcoBoschi
 
Posts: 1065
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy

Re: Navigate an url passing as parameters user_id and password

Postby Antonio Linares » Mon Oct 11, 2010 10:52 am

regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42082
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Navigate an url passing as parameters user_id and password

Postby MarcoBoschi » Mon Oct 11, 2010 12:11 pm

Antonio,
I do not know what is the name of this dialog
Image

But probably the solution is not this one:

#include "FiveWin.ch"

PROCEDURE Main()

LOCAL oIE

oIE := CreateObject( "InternetExplorer.Application" )
oIE:Navigate( "http://172.28.2.161/!mod cmd PHONE DIR local-dir erase-imported" )
oIE:Visible := .T.

WHILE oIE:Busy
SecondsSleep( 1 )
END

oIE:Document:Forms["LogIn"]:Elements[ "UserName" ]:Value := "admin"
oIE:Document:Forms["LogIn"]:Elements[ "Password" ]:Value := "ip110"
oIE:Document:Forms["LogIn"]:Submit()

RETURN
User avatar
MarcoBoschi
 
Posts: 1065
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 57 guests