Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adobe Flash in Selenium, Chrome 54.0.2840.59-1: "This plugin is not supported"

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.

like image 330
Gabriel Duke localh0st Avatar asked Dec 25 '22 00:12

Gabriel Duke localh0st


2 Answers

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.

like image 150
KnightRadiantS Avatar answered Feb 09 '23 00:02

KnightRadiantS


@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

like image 44
Gabriel Duke localh0st Avatar answered Feb 09 '23 00:02

Gabriel Duke localh0st