selenium配置firefox profile, 创建firefox profile

来源:互联网 发布:c语言带小数点数字求和 编辑:程序博客网 时间:2024/05/16 05:37

1  打开运行窗口。输入 firefox –p 回车。会出现下面类似的窗口。

 

 

如果没有出现,可能是你已经打开了 firefox ,如果是请先关闭。

2  点击创建配置文件。然后单击下一步。然后选择一个存放 profile 的文件夹。

3 .给你的新的配置文件输入一个名称。然后点击结束按钮。

这样你的 firefox profile 就配置好了,接下来我们要给我们的 profile 下的 firefox 实例,添加一些插件。这样你在使用这个 profile 的时候就会有相应的插件。

4  打开运行窗口输入 firefox –p 回车。在弹出串口中选择你要使用的 profile 然后点击启动 firefox 按钮就可以使用你的新 profile 了。

5   selenium  start.bat 文件中加入 -firefoxProfileTemplate "your firefox profile path" ,这样你的 selenium server 启动的 firefox 就是指定的 profile 了。

0 0
原创粉丝点击