Selenium Forum: Functional And Regression Testing Tool.
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Search
Display results as :
Advanced Search
Latest topics
AEM Training | Free Online DemoWed Apr 21, 2021 5:45 pmazharuddin
c# PageFactory - issue initializing elementsFri Nov 01, 2019 8:40 pmthegoatboy
Selenium making automatic connection to random urlsMon Jul 08, 2019 12:58 pmrepairtechsolutions1
How can we design the custom framework in Selenium RCMon Jun 24, 2019 2:26 pmrandybonnettes
What are the new features in Selenium 3.0Tue Jun 18, 2019 5:37 pmpappyvicky
What are you using Selenium for? Fri Apr 12, 2019 3:52 amzhl
LIMITATIONS OF SELENIUMWed Apr 10, 2019 11:23 amswara
Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

Go down
avatar
Silent
Posts : 2
Join date : 2015-07-02

Unable to set a specific preference in FireFox Empty Unable to set a specific preference in FireFox

Thu Jul 02, 2015 4:28 am
Hello!

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?? scratch
avatar
seluserqwb1
Active particpant
Active particpant
Posts : 20
Join date : 2015-06-29

Unable to set a specific preference in FireFox Empty Re: Unable to set a specific preference in FireFox

Mon Jul 06, 2015 8:07 pm
Message reputation : 0% (1 vote)
Please post your question in official webdriver forum  - 
www.seleniumtests.com/p/selenium-2-forum.html
avatar
AgoBalan
Amateur
Amateur
Posts : 36
Join date : 2015-02-23

Unable to set a specific preference in FireFox Empty 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
avatar
seluserqwb1
Active particpant
Active particpant
Posts : 20
Join date : 2015-06-29

Unable to set a specific preference in FireFox Empty 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
Sponsored content

Unable to set a specific preference in FireFox Empty Re: Unable to set a specific preference in FireFox

Back to top
Permissions in this forum:
You cannot reply to topics in this forum