Reputation: 79
I have tried to launch Chrome browser via Selenium VBA by using the below code. I am getting this error when executing the code "WebRequestError The underlying connection was closed: An unexpected error occurred on a receive." But IE browser is working fine.
Sub samp()
Dim drv As New Selenium.WebDriver
drv.Start "Chrome"
drv.Get "www.google.com"
End Sub
Upvotes: 2
Views: 12949
Reputation: 2578
I fixed this by installing the latest ChromeDriver, and replacing the .exe-file with the file located in my AppData.
Requirements
Steps
Username
\AppData\Local\SeleniumBasicExample
Now this example code below works as intended
Sub driver()
Dim selenium As New selenium.WebDriver
selenium.Start "chrome", "http://google.com"
selenium.Get "/"
End Sub
Upvotes: 5