Python 可以使用特定配置文件启动 Firefox 吗?

Can Python launch Firefox with a specific profile?

我正在尝试使用 Marionette 及其 Python 客户端为 Firefox 编写一些自动化测试,但 Python 似乎无法启动 Python 具有指定的配置文件。这是一个问题,因为我需要两个 Firefox 配置文件进行测试。我正在尝试使用 subprocess.call(['C:\Program Files (x86)\Mozilla Firefox\firefox.exe', '-P Marionette']) 但它使用默认的 Firefox 配置文件(不是那个配置文件)启动。 Marionette 可以更改当前的 Firefox 配置文件,或者 Python 可以使用命令行参数 运行 特定配置文件吗?

"-P Marionette" 必须是列表中的两个不同条目。 所以使用

subprocess.call([firefox_fullpath, "-p", "Marionette"])

"-P Marionette" 在技术上是两个参数(适用于我所知道的任何 OS)。