python - 使用 webdriver 以编程方式创建 Firefox 配置文件
问题描述
我正在尝试使用 Firefox 创建持久配置文件,使用 chrome 就足以提供这个
chrome_options.add_argument(f"user-data-dir={self.profile_chrome}")
但是使用 Firefox 就很不一样了
fp = webdriver.FirefoxProfile(self.profile_firefox)
但我从未见过它工作,我应该先创建空配置文件吗?文档在这个主题上真的不清楚。有没有人找到怎么做?
解决方案
推荐阅读
- reactjs - react-native-webview 给出 RNCWebview 错误
- html - Boostrap 日期选择器样式被 CSS 表格样式覆盖
- c++ - 如果没有带有函数签名的右值参数,C++ 11 中的 Move Semantic 会被执行吗?
- indexing - RavenDB 4 - 根据 AbstractIndexCreationTask 检索索引名称
类实现 - javascript - 在页面中运行隐藏的 javascript 函数
- ios - Unity Firebase iOS 缺少符号 arm64
- java - 在 ArrayList 中为现有条目设置值
- java - 即使在实现 onSaveInstanceState() 和 onRestoreInstanceState() 方法后也无法保存我的活动状态
- php - 如何生成用于在线票务服务的安全且唯一的令牌?
- vue.js - 如何通过动态道具