1

对于 selenium 中的 ChromeOptions 类,我怎样才能找到我可以与 chromeoptions 类一起使用来执行浏览器特定设置的所有键,例如profile.default_content_settings.popupsdownload.default_directory 。

ChromeOptions option = new ChromeOptions();
Map<String,Object> prefs = new HashMap<String,Object>();
prefs.put("profile.default_content_settings.popups",0);
prefs.put("download.default_directory","C:\\User\\Desktop\\");
4

1 回答 1

0

“使用源头,卢克!” :)

最好和最新的信息确实在源代码中,有很好的文档记录。

所有偏好:https ://chromium.googlesource.com/chromium/src/+/master/chrome/common/pref_names.cc

奖金 - 所有开关:https ://chromium.googlesource.com/chromium/src/+/master/chrome/common/chrome_switches.cc

于 2018-09-05T08:52:56.280 回答