火狐配置文件_如何在不同的配置文件下同时运行Firefox?

火狐配置文件

Firefox has multiple profiles and I am aware of choosing them by invoking firefox with the -P option.

Firefox有多个配置文件,我知道可以通过使用-P选项调用firefox来选择它们。

But I find that after one firefox instance under one profile is running, even I choose another profile during starting with -P, the new instance is still running under the existing profile.

但是我发现,在一个配置文件下运行一个firefox实例后,即使在以-P开头时选择了另一个配置文件,新实例仍在现有配置文件下运行。

How to run firefox with multiple profiles at the same time?

如何同时运行多个配置文件的Firefox?

You can add the -no-remote option when you start firefox and it will allow you to run firefox under multiple profiles at the same time.

您可以在启动 firefox时添加-no-remote选项,它将允许您同时在多个配置文件下运行firefox。

By default, firefox will delegate a command to an already running instance.

默认情况下,firefox会将命令委派给已经运行的实例。

-no-remote will disable this:

-no-remote将禁用此功能:

-no-remote

-远程

Don't connect to any other running instances of firefox. Use this if you want to run firefox in an entirely new process.
Don't connect to any other running instances of firefox. Use this if you want to run firefox in an entirely new process.

Check more on firefox manual.

firefox手册上查看更多信息。

To identify which profile you are running firefox under, the “Show Profile” plugin will be useful:

要确定您在其下运行firefox的配置文件,“显示配置文件” 插件将非常有用:

https://addons.mozilla.org/en-US/firefox/addon/show-profile/

https://addons.mozilla.org/zh-CN/firefox/addon/show-profile/

Answered by Eric Z Ma.
埃里克·马(Eric Z Ma)回答。

翻译自: https://www.systutorials.com/how-to-run-firefox-under-different-profiles-simultaniusly/

火狐配置文件

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
在Robot Framework中,`Open Browser`关键字默认不支持直接传递`firefox_profile`参数来设置Firefox配置文件。如果你尝试使用`firefox_profile`参数而没有创建Firefox配置文件,会导致`init() got an unexpected keyword argument 'firefox_profile'`错误。 如果你想在Robot Framework中使用自定义的Firefox配置文件,你可以使用Python的Selenium库来实现。以下是一个示例代码: ```robotframework *** Settings *** Library SeleniumLibrary *** Test Cases *** Open Firefox with Profile ${options}= Evaluate sys.modules['selenium.webdriver'].FirefoxOptions() sys, selenium.webdriver Call Method ${options} add_argument --profile /path/to/profile Create WebDriver Firefox options=${options} Go To https://www.example.com ``` 在这个示例中,我们首先使用`Evaluate`关键字来创建一个FirefoxOptions对象`${options}`。然后,使用`Call Method`关键字来调用`${options}`对象的`add_argument`方法,将`--profile /path/to/profile`作为参数传递,以设置Firefox配置文件。接下来,我们使用`Create WebDriver`关键字来创建一个Firefox浏览器实例,并将`${options}`作为`options`参数传递。最后,我们使用`Go To`关键字来打开指定的URL。 请确保将`/path/to/profile`替换为实际的Firefox配置文件路径。 这种方法需要你对Python和Selenium库有一定的了解,并且需要手动编写更多的代码。如果你只是想使用默认的Firefox配置文件,可以直接使用`Open Browser`关键字,而无需指定`firefox_profile`参数。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值