Toggle navigation
Home
Latest pastes
FAQ
Random
BitBin is shutting down!
Register
Login
Do not want images to load and CSS to render on Firefox
SUBMITTED BY:
Guest
DATE:
Nov. 13, 2013, 9:24 p.m.
FORMAT:
Text only
SIZE:
755 Bytes
Raw
Download
Tweet
HITS:
1186
Go to comments
Report
from selenium.webdriver.firefox.firefox_profile import FirefoxProfile
def diableImages(self):
## get the firefox profile object
fireFoxProfile = FirefoxProfile()
## Disable images
## Disable CSS
ff_profile.set_preference('permissions.default.stylesheet', 2)
fireFoxProfile.set_preference('permissions.default.image', 2)
## Disable flash
fireFoxProfile.set_preference('dom.ipc.plugins.enabled.libflashplayer.so',
'false')
## Set the modified profile while creating the browser object
self.browserHandle = webdriver.Firefox(fireFoxProfile)
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus