简体   繁体   English

如何使用勇敢的浏览器使用 python 启动 selenium web 驱动程序

[英]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 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.

相关问题 如何在 Windows 上使用 Selenium 和 Python 启动 Brave 浏览器 - How to initiate Brave browser using Selenium and Python on Windows 如何使用带有 python、selenium 和 chromedriver 的 Brave 网络浏览器? - How to use Brave web browser with python, selenium and chromedriver? 如何在 Catalina 上使用带有 Selenium 的 Brave web 浏览器? - How to use Brave web browser with Selenium on Catalina? 如何使用Selenium和Python启动Tor浏览器 - How to initiate Tor Browser using Selenium and Python 如何打开带有扩展程序的brave浏览器? 硒,蟒蛇 - How to open brave browser with extensions? Selenium, Python 如何使用 Selenium 和 Python 启动基于 Chromium 的 Vivaldi 浏览器 session - How to initiate a Chromium based Vivaldi browser session using Selenium and Python 如何使用 Python 在通过 Selenium 和 ChromeDriver 启动的 Brave 浏览器中抑制产品分析通知栏 - How to suppress the product analytics notification bar within Brave Browser initiated through Selenium and ChromeDriver using Python 弃用警告:在 Python Selenium 和 Windows 上使用 Brave 浏览器时使用选项而不是 chrome_options 错误 - DeprecationWarning: use options instead of chrome_options error using Brave Browser With Python Selenium and Chromedriver on Windows 如何使用Selenium Web驱动程序和python作为脚本语言单击图像 - how to click on an image using selenium web driver and python as scripting language 如何在 Z23EEEB4347BDD755BFC6B7EE9A 中使用 selenium firefox 和 chrome 驱动程序翻译 web 页面? - How to translate a web page using selenium firefox and chrome driver in python?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM