Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/351.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python Chrome驱动程序配置文件中未加载扩展_Python_Python 3.x_Google Chrome_Selenium_Selenium Webdriver - Fatal编程技术网

Python Chrome驱动程序配置文件中未加载扩展

Python Chrome驱动程序配置文件中未加载扩展,python,python-3.x,google-chrome,selenium,selenium-webdriver,Python,Python 3.x,Google Chrome,Selenium,Selenium Webdriver,我想在Selenium Chrome中使用配置文件。 我试过: options = webdriver.ChromeOptions() options.add_argument("user-data-dir=C:\\Users\\Bain3\\AppData\\Local\\Google\\Chrome\\User Data\\Profile 1") #Path to your chrome profile w = webdriver.Chrome(chrome_options=options)

我想在Selenium Chrome中使用配置文件。
我试过:

options = webdriver.ChromeOptions()
options.add_argument("user-data-dir=C:\\Users\\Bain3\\AppData\\Local\\Google\\Chrome\\User Data\\Profile 1") #Path to your chrome profile
w = webdriver.Chrome(chrome_options=options)
我不相信配置文件被正确加载,因为扩展没有被加载,而是给了我普通的chrome和chrome自动化扩展。我在geckodriver做过这件事,没有任何问题

我的下一个问题是,因为我想在Selenium chromedriver中使用配置文件。如何从Chrome中删除配置文件图标和图像,因为默认情况下我经常使用Chrome。当我在快捷方式中已经有了配置文件的名称时,使用这些图标似乎毫无意义。 我试过:

以及在
chrome://flags/
关于为什么扩展没有加载配置文件,以及是否可以禁用chrome中的配置文件按钮和图标,有什么想法吗


这是我无法禁用的图标和配置文件图标的图像

我也有同样的问题,然后我使用扩展名crx文件在启动时添加它,方法是:

options.add_extension("idmgcext.crx")
crx文件与脚本位于同一文件夹中,或者提供完整路径(如果在另一个文件夹中,您可以使用此站点获取chrome扩展名crx文件):

options.add_extension("idmgcext.crx")