Reputation: 79
The newest update to Chrome 54.0.2840.59-1 causes selenium to not load Flash plugins. Adobe Flash Player in chrome://plugins/
is disabled, but it's also disabled in the previous version of Chrome.
This only occurs in tests when the Chromedriver is spun up, navigating to a Flash site in a normal Chrome browser shows no issues.
Upvotes: 4
Views: 7153
Reputation: 1
HashMap<String, Object> chromePrefs = new HashMap<>();
chromePrefs.put("plugins.plugins_enabled", new String[] {
"Chrome PDF Viewer",
"Native Client"
});
chromePrefs.put("plugins.plugins_disabled", new String[] {
"Adobe Flash Player"
});
ChromeOptions options = new ChromeOptions();
options.setExperimentalOption("prefs", chromePrefs);
Upvotes: 0
Reputation: 11
Chrome 54 doesn't support Adobe Flash Player NPAPI anymore.So you just should install Adobe Flash Player PPAPI (from https://get.adobe.com/flashplayer/ ) on chrome browser in your system.
Upvotes: 1
Reputation: 114
Installing flash player from https://get.adobe.com/flashplayer/ works for me on mac OS, note that you will need to install this on the chrome driver browser (not the chrome browser in your system). To do this, run your selenium test that opens the chrome and from there go to that URL ^ and follow install steps. After you are done, the next time you run the test it should pick up the change and should work.
Upvotes: 9
Reputation: 79
@sircapsalot: it is possible and we do have automation for our app which is built in flash. It required that we add custom flex handlers which can then be called through javascript.
Linux: To get flash working on chrome 54, I took a working copy of the plugin file from my /usr/google-chrome, then I was able to use pass in a command line argument to chromedriver:
ClassLoader classLoader = getClass().getClassLoader(); File flashPath = new File(classLoader.getResource("libpepflashplayer.so").getFile());
ChromeOptions options = new ChromeOptions(); options.addArguments("--ppapi-flash-path=" + flashPath);
return new ChromeDriver(serviceBuilder.build(), options);
Windows: @user7038292's solution to install flash manually resolved the issue
Upvotes: 2
Reputation: 1
Installing Flash fixed the issue for me, I used chrome's pepperflash before and encountered the same issue you're describing.
Upvotes: -1
Reputation: 29092
Since Chrome 53, they have blocked flash from loading on their browsers. You are using 54, so it applies.
Secondly, Selenium cannot automate Flash, so i think this question is pointless anyway. If you need to automate flash, you should consider another library.
Upvotes: -1