python打开自已配置的firefox

来源:互联网 发布:软件测试佩腾 编辑:程序博客网 时间:2024/06/07 08:16

firefox自已配置文件:

1.CMD,找到安装目录,运行    firefox.exe -ProfileManager  -no-remote

2.点击“start firefox"

3.在新启动的firefox中安装自已需要的配置。  安装某些插件、去掉某些弹出广告的工具栏


参考:http://lijingshou.iteye.com/blog/2085276



使用自已的配置启动firefox:

#配置文件

profile=webdriver.FirefoxProfile(r"C:\Users\Administrator\AppData\Roaming\Mozilla\Firefox\Profiles\znfzhqgh.fire_fox")


self.driver = webdriver.Firefox(profile)


0 0
原创粉丝点击