I am trying to run some Selenium tests on the Brave web browser. I am able to start the Brave web browser through Selenium by using the ChromeDriver. However, nothing else works, e.g. I cannot cause Brave to load a certain web page.
As Brave is based on Chromium, I would think this is the way to go. Are there more appropriate ways that support Brave to be driven by Selenium?
This is de code that I used:
ChromeOptions options = new ChromeOptions().setBinary("/Applications/Brave.app/Contents/MacOS/brave");
WebDriver driver = new ChromeDriver(options);
For the record: this is no longer an issue since Brave went full-Chromium (starting from version 0.57). I can now pass instructions to the WebDriver by initializing it using the code snippet included in the question.
Nevertheless, be sure to check that your ChromeDriver version is compatible with you Brave Browser version.
来源:https://stackoverflow.com/questions/47158434/how-to-run-selenium-tests-on-the-brave-web-browser