https://www.codegrepper.com/code-examples/python/python+selenium+brave+browser
我看到这个例子在 Windows 上使用勇敢的浏览器。它是否应该通过替换 driver_path 和 brave_path 也可以在 Catalina 上工作?
此外,Chromedriver 仅适用于 Chrome。如何确定勇敢的浏览器应该使用哪个版本的chromedriver?
https://chromedriver.chromium.org
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")