首页 > 解决方案 > 使用 webdriver 以编程方式创建 Firefox 配置文件

问题描述

我正在尝试使用 Firefox 创建持久配置文件,使用 chrome 就足以提供这个

        chrome_options.add_argument(f"user-data-dir={self.profile_chrome}")

但是使用 Firefox 就很不一样了

       fp = webdriver.FirefoxProfile(self.profile_firefox)

但我从未见过它工作,我应该先创建空配置文件吗?文档在这个主题上真的不清楚。有没有人找到怎么做?

标签: pythonselenium-webdriver

解决方案


推荐阅读