1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
Sub Test3()
Dim IE As Object, WsH As Object
Set WsH = CreateObject("wscript.shell")
Set IE = CreateObject("InternetExplorer.application")
With IE
.Visible = True
.Navigate ("https://client.relayhub.eu.pitneybowes.com")
Do While .ReadyState <> 4 Or .Busy: DoEvents: Loop 'chargement de la page
.Document.all("username").Focus 'on met le focus sur le username
WsH.SendKeys "toto@hotmail.fr" 'on tape l'email
WsH.SendKeys "{TAB}" 'on passe au password
WsH.SendKeys "mon mot de passe" 'on tape le password
Application.Wait (Now + TimeValue("0:00:01")) 'on laisse une seconde au script de protection pour debloquer le bouton
WsH.SendKeys "{TAB}" 'on passe au bouton (il prend le focus(voir bordure bleu cyan autour))
WsH.SendKeys "{ENTER}" 'on tape enter pour l'activer
End With
Set WsH = Nothing
'set ie=nothing
End Sub |