1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
|
Sub Automatisation_Chargement_PageWeb_IE_NEW()
Dim URL As String, IE As New InternetExplorer, Log, Pass
'Création de l'objet InternetExplorer
Set IE = CreateObject("InternetExplorer.Application") : IE.Visible = True
'Définition de l'URL
URL = https://www.nuoma-mutuelle.fr/loginIn : Log = "IIIIIII" : Pass = "PPPPPPP"
IE.navigate URL
Application.StatusBar = URL & " is loading. Please wait..."
Do While IE.readyState = 4: DoEvents: Loop 'Do While
Do Until IE.readyState = 4: DoEvents: Loop 'Do Until
' @@@@@@@ Bouton ACCEPTER REFUSER @@@@@ Pb1 Apparition Aléatoire !!!
'=======================================
' <button class="close" aria-label="Close" type="button" data-dismiss="modal">
' If IE.document.getElementByclass("close") Is Present Ancienne vérification
' <button id="onetrust-reject-all-handler">Continuer sans accepter</button>
On Error Resume Next
IE.document.getElementById("onetrust-reject-all-handler").Click
On Error GoTo 0
Application.StatusBar = URL & " Loaded" ' Page WEB chargée
'@ <input name="email" class="grey" id="email" autofocus="" type="text" placeholder="Email" value="">
Dim Login As HTMLElementCollection
Set Login = IE.document.getElementById("email"): Login.Value = Log
'@ <input name="password" class="grey form-password" id="password" type="password"
placeholder="Mot de passe">
Dim MPass As HTMLElementCollection
Set MPass = IE.document.getElementById("password"): MPass.Value = Pass
' @@@@@@@ Bouton VALIDER le LOGING @@@@@@@ Pb2 Essais infructueux !!!
'=======================================
'@ Entrer ==> Bouton ' <input type="submit" value="Entrer" form="connexionAccount"> '
' <div class="button submitBtn">
' <input type="submit" value="Entrer" form="connexionAccount">
' <span class="icon icon-arrow white"></span> </div>
On Error Resume Next
IE.document.findElementByClass("button submitBtn").Click
On Error GoTo 0
Do While IE.Busy: DoEvents: Loop
Set IE = Nothing
End Sub |
Partager