- Silent
- Posts : 2
Join date : 2015-07-02
Unable to set a specific preference in FireFox
Thu Jul 02, 2015 4:28 am
Hello!
Here is my Python code:
My goal is to stop images, style-sheets and flash from loading to speed up the process as much as possible.
No matter what I do, "permissions.default.image" stays 1. I am still able to manually set it in the browser window that opens, and then it works.
"permissions.default.stylesheet" is set to 2 and works as expected.
What is going on here??
Here is my Python code:
- Code:
from selenium import webdriver
import time
firefox_profile = webdriver.FirefoxProfile()
firefox_profile.set_preference('permissions.default.image', 2)
firefox_profile.set_preference('permissions.default.stylesheet', 2)
firefox_profile.set_preference('dom.ipc.plugins.enabled.libflashplayer.so', 'false')
driver = webdriver.Firefox(firefox_profile=firefox_profile)
driver.get('url')
#driver.close()
My goal is to stop images, style-sheets and flash from loading to speed up the process as much as possible.
No matter what I do, "permissions.default.image" stays 1. I am still able to manually set it in the browser window that opens, and then it works.
"permissions.default.stylesheet" is set to 2 and works as expected.
What is going on here??
- seluserqwb1Active particpant
- Posts : 20
Join date : 2015-06-29
Re: Unable to set a specific preference in FireFox
Mon Jul 06, 2015 8:07 pm
Please post your question in official webdriver forum -
www.seleniumtests.com/p/selenium-2-forum.html
www.seleniumtests.com/p/selenium-2-forum.html
- AgoBalanAmateur
- Posts : 36
Join date : 2015-02-23
Re: Unable to set a specific preference in FireFox
Tue Jul 07, 2015 8:10 pm
Not sure, may be check FF version and standalone version.... try with latest version of Bothj application
- seluserqwb1Active particpant
- Posts : 20
Join date : 2015-06-29
Re: Unable to set a specific preference in FireFox
Wed Jul 08, 2015 3:44 pm
Please post your question in official webdriver forum -
www.seleniumtests.com/p/selenium-2-forum.html
www.seleniumtests.com/p/selenium-2-forum.html
- Unable to run firefox from selenium webdriver
- How to capture screenshot only the specific element?
- Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output
- Issues with IE close browser, Firefox window focus. unable to get screenshots any browser
- Warning: Unresponsive script on Firefox 11, Firefox 12, Firefox 13 on selenium-server-standalone-2.x
Permissions in this forum:
You cannot reply to topics in this forum