Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Automate login procedure in a web page
Message
 
 
À
02/07/2003 15:53:24
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00806283
Message ID:
00806332
Vues:
56
Here's code based on StartUT.prg File #9598 with some corrections
DECLARE Sleep IN WIN32API Long
lcUserName = "..."
lcPassword = "..."

oIE = CREATEOBJECT("InternetExplorer.Application")
oIE.Visible = .T.
oIE.Navigate2("www.levelextreme.com")

Sleep(1000)
nStartSeconds = SECONDS()
DO WHILE oIE.ReadyState <> 4 ;
		AND oIE.Document.ReadyState <> "complete" ;
		AND (SECONDS()-nStartSeconds < 30)
ENDDO

IF oIE.Document.ReadyState <> "complete"
	MESSAGEBOX("Universalthread is unavailable")
	RETURN .F.
ENDIF

WITH oIE.document.forms("login")
	.Username.Value = lcUsername
	.Password.Value = lcPassword
	.Submit()
ENDWITH
>Hello all
>
>How would i automate the button press of a web page button, for example how would i automate the login procedure for UT webpage ,i would supply the user name and password and want to click the login button programatcially.
>
>Txs
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform