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