2

I am trying to data scrape from a website that is only compatible with Google Chrome. I want to scrape the info into an Excel file so I would like to use VBA to accomplish this.

This is my code.

Sub OpenGoogleChrome()

Dim driver As New WebDriver
driver.Start "chrome", "http://www.google.com"
driver.Get "/"

End Sub

I've tried several variations of this code but I get the same error:

enter image description here

I am just simply trying to open chrome through this automation process so I can utilize it to data scrape later.

I am using Chrome v69, the most recent version of Selenium Basic (2.0.9.0) and I've replaced the Selenium Basic ChromeDriver with the latest version (2.42).

These are my VBA references for my code:

enter image description here

Any help would be much appreciated.

EDIT: I'm using Windows 10 and I do have the necessary .Net framework.

7
  • 1
    Is the folder containing the chromedriver on the environmental path? And do you have .Net framework installed? Does the same error occur with other drivers e.g. FireFox? And are you on Windows 10? Commented Oct 5, 2018 at 16:44
  • @QHarr yes it is, I'm not sure if I have .Net framework installed (I'm not sure what that is exactly), so I'll look into that right now. I don't have FireFox so I haven't tried, and yes, I'm on Windows 10. Commented Oct 5, 2018 at 16:50
  • AFAIK it is only possible to scrape IE with Microsoft Internet Controls and VBA. It may be possible to do with Chrome, but I think you're going to find it extremely hairy. If you do find a solution, please report back. Commented Oct 5, 2018 at 17:11
  • 2
    @ScottHoltzman with selenium basic you can scrape better using multiple browsers than by using IE via internet controls. Just there are some third party issues to overcome for some people. Commented Oct 5, 2018 at 17:39
  • I have had a few people say they have issues with windows 10 but haven’t found anything useful in the GitHub issues. Commented Oct 5, 2018 at 17:40

2 Answers 2

1

SeleniumBasic requires .NET Framework 3.5. I had the same problem once and activating it on Turn Windows features on and off dialog solved the problem. It worth the try

Sign up to request clarification or add additional context in comments.

1 Comment

another user on my forum reported that he had issues with permissions. It might help (in Portuguese): tomasvasquez.com.br/forum/…
0

I faced this error as well, but solved it after I install Selenium via administrator mode.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.