Reputation:
When I open firefox it has Flash installed in it but when I open it through selenium That version of firefox has not Flash in it. How to enable flash in selenium . This is the test code I am working with :
firefoxProfile = FirefoxProfile()
firefoxProfile.set_preference('dom.ipc.plugins.enabled.libflashplayer.so','true')
b = webdriver.Firefox(firefoxProfile, executable_path=r"C:\\Program Files\geckodriver-v0.16.1-win64\geckodriver.exe")
b.get("http://www.python.org")
Upvotes: 4
Views: 1722
Reputation: 5406
Try adding the following to your current code:
firefoxProfile.set_preference("plugin.state.flash", 2)
Upvotes: 5