![vba-Excel:Selenium.Start 不起作用。为什么?](https://linux22.com/image/1555820/vba-Excel%EF%BC%9ASelenium.Start%20%E4%B8%8D%E8%B5%B7%E4%BD%9C%E7%94%A8%E3%80%82%E4%B8%BA%E4%BB%80%E4%B9%88%EF%BC%9F.png)
我已经从此链接安装了最新版本的 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