一、打开cmd

1. cd C:\program files\mozilla firefox(Firefox安装目录)

2. 执行: firefox.exe -ProfileManager -no-remote



二、增加新的配置

在打开的窗口中(上图)选择创建配置文件,完事点击【启动Firefox】

 

三、将新生成的配置文件指定给selenium webdrive

1. 生成配置文件路径:C:\Users\zach\AppData\Roaming\Mozilla\Firefox\Profiles\

2. 将生成的配置文件写入代码

browser_path = 'C:\Users\zach\AppData\Roaming\Mozilla\Firefox\Profiles\gfk3atbn.selenium'

driver = webdriver.Firefox(browser_path)

 

转载于:https://www.cnblogs.com/FengZiQ/p/8074284.html

Logo

北京人形旗下天工造物具身智能开源社区,聚焦具身天工与慧思开物两大平台

更多推荐