我已经从此链接安装了最新版本的 Selenium:https://github.com/florentbr/SeleniumBasic/releases/latest
我已将最新的 ChromeDriver 移至 SeleniumBasic 文件夹中:https://sites.google.com/a/chromium.org/chromedriver/downloads
我在“参考”中启用了“Selenium 类型库”。Chrome
窗口会在几秒钟后自动打开并关闭:
Sub StartChrome()
Dim Selenium As New ChromeDriver
Selenium.Start , "https://www.google.it/"
End Sub
为什么?
Microsoft Office 365 Home Premium Retail v16.0.9029.2167(最新版本)(Office 2016)
Windows 7 Ultimate 64 位
答案1
我解决了!:-D
Option Explicit
Private Chrome As New ChromeDriver
Sub ChromeAutomation()
Chrome.Start: Chrome.Get "https://www.google.it/"
End Sub