Please help me to solve this problem, i have tried many ways since one month ago, but i always failed.
I use Windows 7, Service Pack 1, 64 bit - Microsoft Excel professionl plus 2019. My Current Chrome version is 94.0.46, I have tried other versions as well. I use Chromedrive version 94.0.4606 but also have tried 93 and 92 versions. I have tried different versions of SeleniumBasic, from 2.0.2.0 to 2.0.9.0 . Also Google Chrome is not running as an administrator.
What i do always is: I uninstll Selenium, install it again or its another versaion, download the same chromedrive version that my google chrome uses, copy the chromedrive into the Selenium folder, either in "program files" path or "users" path and start it. Also "selenium Type Library" is selected in VBA References.
I run a very simple code:
Sub TestSelenium()
Dim Mybrowser As Selenium.ChromeDriver
Set Mybrowser = New Selenium.ChromeDriver
Mybrowser.Start
End Sub
I always get same error:
CodePudding user response:
Define Mybrowser
as webdriver
. Please try below code.
Sub TestSelenium()
Dim Mybrowser As new webdriver
Mybrowser.start "chrome"
Mybrowser.get "https://google.com"
Application.Wait Now Timevalue("00:00:20")
End Sub