Bonjour,
sauriez-vous comment cliquer en vbs sur ce lien d'une page html intitulé page1, svp.
Code:
1
2
3
4
5
6
7
8 <!DOCTYPE html> <html> <head> <ul id="menu-vertical"> <li><a " href="https://www.google.fr">GOOGLE</a> </li> </ul> </html>
Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 Option Explicit Dim objApp, Window, monURL, count Set objApp = CreateObject("Shell.Application") count = -1 For Each Window In objApp.Windows If Window = "Internet Explorer" Then count = count+1 monURL = objApp.Windows(count).locationUrl msgbox monURL if monURL = "file:///C:/Users/username/Desktop/page1.html" then msgbox "ok" ' CODE POUR FAIRE UN CLIC end if End If Next Set objApp = Nothing