10

I already have a fully operating scrape tool that uses Google Chrome. To make it go fast I programmatically configure it with ad blockers, tracker blockers, image blockers, pop up blockers, etc. (basically every kind of blocker). There are many lines of configuration code to maintain.

Along comes Brave.

Which has all of the blockers that I want - built in! It's also built on Chromium - just like Chrome. For this reason it would make sense that I could use the ChromeDriver with Brave. But does it really work?

So I tried it - and failed - with the following exception:

System.InvalidOperationException occurred
  HResult=0x80131509
  Message=unknown error: no chrome binary at C:\SOMEPATH\Brave64\app-0.22.22\brave.exe
  (Driver info: chromedriver=2.38.552522 (437e6fbedfa8762dec75e2c5b3ddb86763dc9dcb),platform=Windows NT 6.1.7601 SP1 x86_64)
  Source=WebDriver
  StackTrace:
   at OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse)
   at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
   at OpenQA.Selenium.Remote.RemoteWebDriver.StartSession(ICapabilities desiredCapabilities)
   at OpenQA.Selenium.Remote.RemoteWebDriver..ctor(ICommandExecutor commandExecutor, ICapabilities desiredCapabilities)
   at OpenQA.Selenium.Chrome.ChromeDriver..ctor(ChromeOptions options)
   at FOO.GOO.Historical.Scrape.Session.CreateDriver[T]() in D:\FOO\FOO.GOO.Historical.Scrape\Session.cs:line 211
   at FOO.GOO.Historical.Scrape.TestFixtures.Pages.PageTest.SessionSetUp(Boolean login) in D:\FOO\FOO.GOO.Historical.Scrape\TestFixtures\Pages\PageTest.cs:line 23
   at FOO.GOO.Historical.Scrape.TestFixtures.ScraperTests.SetUp() in D:\FOO\FOO.GOO.Historical.Scrape\TestFixtures\ScraperTests.cs:line 21

So clearly it isn't directly replaceable. The ChromeDriver indicates it wants a chrome binary, not a brave binary.

Can someone please explain if there is a driver that works for Brave? I'm already drooling over the performance gains.

sapbucket
  • 6,795
  • 15
  • 57
  • 94
  • Update the question with your code trials – undetected Selenium Apr 24 '18 at 05:49
  • @DebanjanB - by saying that you imply that ChromeDriver does work with Brave. Which is actually an answer to my question. But is this true? I'm happy to share code if it will lead down a successful path; but the code I have is already conceptually flawed if ChromeDriver and Brave are incompatible. – sapbucket Apr 24 '18 at 14:14
  • Well, I haven't researched yet :) but I am inclined to do the research if it helps you. Hence I was asking about your ground work. – undetected Selenium Apr 24 '18 at 14:16
  • @sapbucket Did you find a supported web driver for `brave browser`? – Master Po May 02 '19 at 06:05

1 Answers1

2

As stated in this answer brave browser fully supports chrome webdriver. You should have a look at chrome://version and check whether the webdriver and browser/chromium versions really match.

Abrogans
  • 179
  • 1
  • 13