[英]How to initiate selenium web driver with brave browser using python
My chromium version is 87.0.4280.88我的铬版本是 87.0.4280.88
My brave browser version is 87.0.4280.101我的勇敢浏览器版本是87.0.4280.101
I tried a lot of codes but they didn't work.我尝试了很多代码,但它们没有用。
Code:代码:
from selenium import webdriver
option = webdriver.ChromeOptions()
option.binary_location = r'C:\Program Files (x86)\BraveSoftware\Brave-
Browser\Application\brave.exe'
driver = webdriver.Chrome(
executable_path=r'C:\WebDrivers\chromedriver.exe', options=option)
driver.get("https://www.google.com")
Error traceback:错误回溯:
Traceback (most recent call last):
File "c:\Users\MOHSEN\Desktop\test\Untitled-1.py", line 5, in <module>
driver = webdriver.Chrome(
TypeError: __init__() got an unexpected keyword argument 'options'
To initiate a brave Browsing Session using Selenium driven WebDriver you can use the following solution:要使用Selenium驱动的WebDriver启动勇敢的浏览 Session ,您可以使用以下解决方案:
Code Block:代码块:
from selenium import webdriver option = webdriver.ChromeOptions() option.binary_location = r'C:\Program Files (x86)\BraveSoftware\Brave-Browser\Application\brave.exe' driver = webdriver.Chrome(executable_path=r'C:\WebDrivers\chromedriver.exe', options=option) driver.get("https://www.google.com")
Browser Snapshot:浏览器快照:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.