Hi,
I wanted to allow "pop-up and redirect" and "Ads" options from chrome://settings/content/ using Selenium Version 3.141 and chrome version is 77 in C#.
The current code Ihave is
var options = new ChromeOptions();
options.SetLoggingPreference("driver", OpenQA.Selenium.LogLevel.All);
options.AddArgument("-incognito");
options.AddArgument("start-maximized");
options.AddArgument("--disable-extensions"); options.AddUserProfilePreference("profile.default_content_settings.popups", 0);
options.AddUserProfilePreference("download.default_directory", downloadPath); options.AddUserProfilePreference("profile.default_content_setting_values.automatic_downloads", 1);
driver = new ChromeDriver(WebDriverPath, options);
Any help here would be great.
What I have tried:
I have tried the below options
1) changing the value as 1 and 2
options.AddUserProfilePreference("profile.default_content_settings.popups", 1);
2) options.addArguments("--disable-popup-blocking");
3) options.AddExcludedArgument("disable-popup-blocking");
Nothing worked.