How to enable Adobe Flash Player in Chrome or Firefox?

930 views
Skip to first unread message

skd

unread,
Nov 10, 2017, 5:38:59 PM11/10/17
to Selenium Users

I have some legacy regression tests that open a page to display a flash interface that the user interacts with, but these tests all started failing recently because the flash interface does not load. I know support for flash is going away in many browsers, but we need to make sure that changes to the server-side code continues to work with flash for as long as possible. We are migrating to HTML5 interfaces as quickly as we can...

It doesn't matter whether these legacy tests are run in Chrome or Firefox. On Chrome, a place holder is displayed with "Click to enable Adobe Flash Player". On Firefox, the <div> containing the Flash object is not shown at all. Has anyone been able to enable Flash in either browser? I know that it was decided to disable Flash for Firefox by default, so I’m guessing Chrome would be the better option.

Windows 7 & 10
Selenium (Java) 3.7.1
Chrome 62.0.3202.89 with chromedriver 2.33
Firefox 56.0.2 with geckodriver 0.18.0

 

Thanks!

skd

unread,
Nov 10, 2017, 5:42:50 PM11/10/17
to Selenium Users
chromedriver.log

skd

unread,
Nov 14, 2017, 1:59:51 PM11/14/17
to Selenium Users
I found the answer (for Chrome) to my question here. Adding these preferences to the Chromedriver's options worked for me.

ChromeOptions options = new ChromeOptions();
Map<String, Object> prefs = new HashMap<>(); // Enable Flash prefs.put("profile.default_content_setting_values.plugins", 1); prefs.put("profile.content_settings.plugin_whitelist.adobe-flash-player", 1); prefs.put("profile.content_settings.exceptions.plugins.*,*.per_resource.adobe-flash-player", 1); options.setExperimentalOption("prefs", prefs); ChromeDriver driver = new ChromeDriver(options);

Dhiraj Jha

unread,
May 10, 2018, 1:50:18 PM5/10/18
to Selenium Users
I want to do this using python for chrome selenium.
I just want to enable flash and all plugins while I run my python script using selenium.
Now it is blocking and I had to do it manually.
Firefox I am able to do but I want to use chrome. 
Any lead would be great help.

// Enable Flash
prefs.put("profile.default_content_setting_values.plugins", 1);
prefs.put("profile.content_settings.plugin_whitelist.adobe-flash-player", 1);
prefs.put("profile.content_settings.exceptions.plugins.*,*.per_resource.adobe-flash-player", 1);


Christian Prado

unread,
Aug 10, 2018, 12:39:05 AM8/10/18
to Selenium Users
I'm having trouble to enable the flash player on firefox, can you tell me how you made it work ?
My versions are:  FF is 61.0.1, geckodriver 0.20.1, selenium 3.12
Reply all
Reply to author
Forward
0 new messages