我有一个Selenium(Java)测试应用程序,该应用程序在浏览器中打开pdf文档,并将其保存到硬盘驱动器中,以供稍后在测试中使用.由于将要在多台计算机上使用该测试,因此无法手动设置配置文件.它必须以编程方式完成.
在Firefox中,我设置了配置文件首选项:
FirefoxProfile profile = new FirefoxProfile();
profile.setPreference("browser.download.manager.showWhenStarting", false);
profile.setPreference("browser.download.dir", appSet.getDocumentSavePath());
profile.setPreference("browser.download.folderList", 2);
profile.setPreference("plugin.disable_full_page_plugin_for_types", "application/pdf");
profile.setPreference("pref.downloads.disable_button.edit_actions", true);
profile.setPreference("browser.helperApps.neverAsk.saveToDisk", "application/pdf");
profile.setPreference("pdfjs.disabled", true);
Chrome是否有等效功能?
我知道Chrome中有一些功能可以设置开关,但是我看不到有什么功能可以帮助我.
DesiredCapabilities capabilitie