【问题标题】:How to switch Firefox profile with Selenium - without instantiating a new driver?如何使用 Selenium 切换 Firefox 配置文件 - 无需实例化新驱动程序?
【发布时间】:2013-04-30 15:39:50
【问题描述】:

试图找到一种在 Selenium Firefox 驱动程序中切换活动配置文件的方法。 This question about multiple Firefox profiles 声明可以创建和使用多个配置文件。但是,如果有某种方法可以在驱动程序会话中切换活动的 Firefox 配置文件,而不是启动一个新配置文件,那就更好了。

如何使用 Selenium 切换活动的 Firefox 配置文件?

非常感谢!

【问题讨论】:

  • 我很确定你不能。配置文件控制着 Firefox 实例的启动和运行的许多事情,因此能够从一个配置文件热交换到另一个配置文件是没有意义的(如果它在技术上是可行的)。

标签: python unit-testing firefox browser selenium


【解决方案1】:

你不能。 Selenium 不允许您更改 Firefox 配置文件,我很确定即使 Firefox 也不会。

【讨论】:

    猜你喜欢
    • 2011-01-16
    • 1970-01-01
    • 2021-05-30
    • 2014-01-03
    • 1970-01-01
    • 2019-02-27
    • 1970-01-01
    • 2013-12-19
    • 2019-01-06
    相关资源
    最近更新 更多