Hi,
I want to disable PDF opening in new tab and instead download the PDF while executing the selenium scripts.
For Chrome, I have the below chrome options and it works fine.
- chromeOptions.AddUserProfilePreference("plugins.always_open_pdf_externally", true);
- chromeOptions.AddUserProfilePreference("plugins.plugins_disabled", new[] { "Chrome PDF Viewer" });
- chromeOptions.AddUserProfilePreference("profile.default_content_setting_values.automatic_downloads", 1);
On Edge, I tried below but it does not work.
- edgeOptions.AddUserProfilePreference("profile.default_content_setting_values.automatic_downloads", 1);
- edgeOptions.AddUserProfilePreference("plugins.always_open_pdf_externally", true);
Am I missing some steps?
Thanks,
Rommel