private Dictionary <string, object> GetDefaultChromePrefs(string defaultDirectory) { Dictionary <string, object> prefs = new Dictionary <string, object>(); prefs.Add("profile.default_content_settings.popups", 0); prefs.Add("download.default_directory", defaultDirectory); prefs.Add("download.prompt_for_download", "false"); prefs.Add("plugins.plugins_disabled", new String[] { "Chrome PDF Viewer" }); prefs.Add("plugins.always_open_pdf_externally", LocalConfigsEntityContainer.GetLocalConfigs().IsOpenDownloadedFile); prefs.Add("profile.default_content_settings.geolocation", 2); return(prefs); }
private IWebDriver GetLocalDriverInstance() { IWebDriverStrategy currentWebDriverStrategy; if (_driversInstances.TryGetValue(LocalConfigsEntityContainer.GetLocalConfigs().Driver.ToUpper().ToEnum <DriverTypes>(), out currentWebDriverStrategy)) { return(currentWebDriverStrategy.GetLocalWebDriverInstance()); } else { throw new ArgumentException("Unsupported local driver type: " + LocalConfigsEntityContainer.GetLocalConfigs().Driver); } }