Page tree
Skip to end of metadata
Go to start of metadata

Last updated: Nov 13, 2018 22:11

Problem

Sometimes there is a need to use Chrome options which are not a part of standard capabilities.

Solution

The code example below shows the passing Chrome Options as capabilities:

ChromeOptions options = new ChromeOptions();

options.addExtensions(new File("/path/to/extension.crx"));

options.addArguments("--disable-web-security");

capabilities.setCapability(ChromeOptions.CAPABILITY, options);