I need to allow all cookies when running tests with selenium + chrome driver.
I am trying to add this as a profile preference using ChromeOptions.AddUserProfilePreference
and have tried the following in my setup but its not having the desired effect.
options.AddUserProfilePreference("profile.block_third_party_cookies", false);
and
options.AddUserProfilePreference("security.cookie_behavior", 0);
Here is my setup code
new DriverManager().SetUpDriver(new ChromeConfig());
var options = new OpenQA.Selenium.Chrome.ChromeOptions { };
options.AddArgument("–no-sandbox");
options.AddArguments("-disable-gpu");
options.AddArguments("-disable-dev-shm-usage");
options.AddArgument("-incognito");
options.AddArgument("-start-maximized");
options.AddUserProfilePreference("security.cookie_behavior", 0);
CurrentWebDriver = new ChromeDriver(options);