How to use Brave web browser with python, selenium and chromedriver?

I finally managed to make it work: Try this python script (python3.7) from selenium import webdriver driver_path = “C:/Users/username/PycharmProjects/chromedriver.exe” brave_path = “C:/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe” option = webdriver.ChromeOptions() option.binary_location = brave_path # option.add_argument(“–incognito”) OPTIONAL # option.add_argument(“–headless”) OPTIONAL # Create new Instance of Chrome browser = webdriver.Chrome(executable_path=driver_path, chrome_options=option) browser.get(“https://www.google.es”) cheers.

Use Selenium with Brave Browser pass service object written in python

To initiate a brave browsing context you need to: Use the binary_location attribute to point to the brave binary location. Use the chromedriver executable to initiate the brave browser. Code block: from selenium import webdriver from selenium.webdriver.chrome.service import Service option = webdriver.ChromeOptions() option.binary_location = r’C:\Program Files (x86)\BraveSoftware\Brave-Browser\Application\brave.exe’ driverService = Service(‘C:/Users/…/chromedriver.exe’) driver = webdriver.Chrome(service=driverService, options=option) driver.get(“https://www.google.com”) … Read more