简体   繁体   English

Chrome 无法使用 selenium python 打开配置文件

[英]Chrome can't open a profile using selenium python

When I run this code当我运行这段代码

import time
from selenium import webdriver
from selenium.webdriver.chrome.options import Options

chrome_options = Options()
chrome_options.add_argument("--disable-infobars")
chrome_options.add_argument("--start-maximized")
chrome_options.add_argument(r"user-data-dir=C:\Users\micha\AppData\Local\Google\Chrome\User Data\Profile 1")

driver = webdriver.Chrome(executable_path=r'C:\Users\micha\Desktop\Visual_projects\chromedriver.exe', chrome_options = chrome_options)

driver.get("https://store.steampowered.com/")
This error pops up : [12216:1336:0411/232857.718:ERROR:browser_switcher_service.cc(238)] XXX Init()

Could someone please help me.有人可以帮助我。 I don't know what is wrong but the programm won't open the new profile I created.我不知道出了什么问题,但程序不会打开我创建的新配置文件。 Any help would be appreciated.任何帮助,将不胜感激。

I searched everywhere how to fix this error but I think the guides are outdated我到处搜索如何解决此错误,但我认为指南已过时

Check your Chrome browser version and your Chrome webdriver version.检查您的Chrome 浏览器版本和 Chrome网络驱动程序版本。 If both are same then issue should be solved.如果两者相同,则应该解决问题。

One thing to check would be, if your ChromeDriver-Executable matches the version of the Chrome you have installed (under Help/About Google Chrome in your browser).要检查的一件事是,如果您的 ChromeDriver-Executable 与您安装的 Chrome 版本匹配(在您的浏览器中的帮助/关于 Google Chrome 下)。 There are versions 79, 80 and 81 mostly in use.主要使用版本 79、80 和 81。 You can find the current ChromeDrivers for all three versions here: https://chromedriver.chromium.org/downloads .您可以在此处找到所有三个版本的当前 ChromeDrivers: https://chromedriver.chromium.org/downloads

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用mac上的python和selenium打开使用默认用户配置文件的chrome - Open chrome with default user profile using python and selenium on mac 无法在Debian上使用Selenium加载Chrome配置文件 - Can't load Chrome profile with Selenium on Debian 无法在python中使用selenium打开IE - Can't open IE using selenium in python 硒无法在python的win7上打开Chrome浏览器? - selenium can't open chrome browser on win7 in python? Python selenium function 打开新的 ZE6B391A8D2C4D459002A23A8B6 与 Chrome 用户配置文件不起作用 - Python selenium function to open a new URL doesn't work with Chrome user profile 如何使用Python Selenium Webdriver通过默认的Chrome配置文件打开URL - How to open URL through default Chrome profile using Python Selenium Webdriver 如何在python的自定义配置文件中使用硒打开Goog​​le chrome [操作系统:Ubuntu] - How to open Google chrome using selenium in a custom profile in python [Operating System: Ubuntu] 使用 selenium 打开多个镀铬轮廓 - open multiple chrome profile with selenium 尝试在 python 3.8 中使用 selenium 在我的个人资料上打开 chrome - Trying to open chrome on my profile with selenium in python 3.8 为什么我不能用硒打开铬? - Why can't i open chrome with selenium?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM