Disabling flash in Chrome Disabling flash in Chrome google-chrome google-chrome

Disabling flash in Chrome


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.


chrome://plugins doesn't exist anymore in Chrome 57 and above. Method proposed by alecxe in accepted answer unfortunately doesn't work for me.

I was able to workaround this issue by turning on mobile emulation on ChromeDriver. Example code for some languages can be found here: https://sites.google.com/a/chromium.org/chromedriver/mobile-emulation

Example code for java from the above page:

Map<String, String> mobileEmulation = new HashMap<String, String>();mobileEmulation.put("deviceName", "Google Nexus 5");Map<String, Object> chromeOptions = new HashMap<String, Object>();chromeOptions.put("mobileEmulation", mobileEmulation);DesiredCapabilities capabilities = DesiredCapabilities.chrome();capabilities.setCapability(ChromeOptions.CAPABILITY, chromeOptions);WebDriver driver = new ChromeDriver(capabilities);

You can also specify your own screen resolution, pixel ratio and even userAgent.

Map<String, Object> deviceMetrics = new HashMap<String, Object>();deviceMetrics.put("width", 1920);deviceMetrics.put("height", 1080);deviceMetrics.put("pixelRatio", 1.0);Map<String, Object> mobileEmulation = new HashMap<String, Object>();mobileEmulation.put("deviceMetrics", deviceMetrics);mobileEmulation.put("userAgent", "Mozilla/5.0 (Linux; Android 4.2.1; en-us; Nexus 5 Build/JOP40D) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Mobile Safari/535.19");Map<String, Object> chromeOptions = new HashMap<String, Object>();chromeOptions.put("mobileEmulation", mobileEmulation);DesiredCapabilities capabilities = DesiredCapabilities.chrome();capabilities.setCapability(ChromeOptions.CAPABILITY, chromeOptions);WebDriver driver = new ChromeDriver(capabilities);

This will work with RemoteWebDriver also.


To disable Flash Player, type:

chrome:plugins

Into your URL bar. There you will see a list of all your plugins, including Flash Player. Press the button that says disable and you are good to go!