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