Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disabling flash in Chrome

One of our internal applications has a flash object on a page. I need to test one of the corner cases when there is no flash plugin available/installed in the browser: neither the internal (pepperflash), nor the system-wide adobe flash player plugin.

According to the List of Chromium Command Line Switches documentation page, there is a relevant command-line switch:

--disable-bundled-ppapi-flash - Disables the bundled PPAPI version of Flash.

But, this would turn off only the pepperflash internal chrome plugin.

According to the How to run Chrome/Firefox with disabled flash plugin from watir script? thread, there is also --disable-internal-flash switch, but it is also relevant to the chrome's internal flash plugin.

Browserstack's documentation suggests to follow the principle "the guillotine is the best dandruff cure" and to disable all plugins by using --disable-plugins switch:

To disable Flash in Chrome, create a chromeOptions capability, and pass the --disable-plugins argument to the capability.

Is there a way to disable all flash plugins without disabling all plugins in Chrome?


For instance, would be perfect to have a preference to list all of the plugins that needs to be turned off:

plugins.disabled: ['Adobe Flash Player', 'pepperflash']
like image 543
alecxe Avatar asked Mar 18 '23 18:03

alecxe


1 Answers

Found it, there is an another switch which tells chrome not to load external plugins at all:

--disable-plugins-discovery Disable discovering third-party plug-ins. Effectively loading only ones shipped with the browser plus third-party ones as specified by --extra-plugin-dir and --load-plugin switches.

By combining --disable-internal-flash and --disable-plugins-discovery I've achieved disabling all flash plugins in Chrome.

like image 195
alecxe Avatar answered Mar 23 '23 01:03

alecxe