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!
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);
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);