ChromeOptions options = new ChromeOptions();
Map<String, Object> prefs = new HashMap<String, Object>();
prefs.put("profile.default_content_settings.popups", 0);
prefs.put("download.default_directory", getClass().getResource("/data/input").toString().replace("%20", " ").replace("file:","").replaceFirst("/", ""));
options.setExperimentalOption("prefs", prefs);
options.addArguments("--test-type");
capabilities.setCapability(ChromeOptions.CAPABILITY, options);
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…