You can disable flash using the below profile.
from selenium.webdriver.firefox.firefox_profile import FirefoxProfile
def disableImages(self):
## Firefox profile object
firefoxProfile = FirefoxProfile()
## 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)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…