How to disable all browser pop ups on Chrome with Java-Cucumber?

How to disable all browser pop ups on Chrome with Java-Cucumber?

Hi Macy,

To disable all browser pop ups on Chrome with Java-Cucumber, you can do so by adding the capabilities below:

ChromeOptions options = new ChromeOptions();
options.setExperimentalOption("excludeSwitches",Arrays.asList("disable-popup-blocking"));
caps.setCapability(ChromeOptions.CAPABILITY, options);