user1593800 user1593800 - 2 years ago 138
Python Question

Selenium Firefox webdriver does not adopt profile

I have created a FF profile:

fp = webdriver.FirefoxProfile()
fp.set_preference("", CLIENT_SAVING_DIR)
fp.set_preference("browser.helperApps.neverAsk.saveToDisk", "application/octet-stream")

Then pass this profile to remote mode webdriver:

driver = webdriver.Remote(remoteHost,

I've downgraded my Firefox to version 35.0 and using Selenium

The driver works just fine but it seems the profile I had set is not used. The browser still appears the download prompt dialog.

I have tried for many times and consult everything I could find. Even tried playing with
in FireFox but useless.
Could anyone please help?

Answer Source

I have found the answer. (It took me for a day at work)

fp = webdriver.FirefoxProfile()
... set your profile attributes
fp.update_preference() #the answer

I think it's important to paste this line at the end of profile definition. Selenium API should put this line into their documentation.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download