How to config firefox's preference when use webdriver

来源:互联网 发布:dns 端口 编辑:程序博客网 时间:2024/05/19 00:43
from selenium import webdirver
profile.set_preference('network.proxy.type', 1)profile.set_preference('network.proxy.http', '10.226.54.3')profile.set_preference('network.proxy.http_port', 8090)profile.set_preference('network.proxy.ssl', '10.226.54.3')profile.set_preference('network.proxy.ssl_port', 8090)profile.update_preferences()profile = webdriver.FirefoxProfile()
browser = webdriver.Firefox(profile)




References:http://code.google.com/p/selenium/wiki/FirefoxDriver

https://code.google.com/p/selenium/issues/detail?id=2061

http://kb.mozillazine.org/Firefox_:_FAQs_:_About:config_Entries

0 0
原创粉丝点击