Skip to content

Instantly share code, notes, and snippets.

@seleniumgists
Created October 9, 2020 19:48
Show Gist options
  • Save seleniumgists/19857d71e04d47eb941e1ff6a13bbaae to your computer and use it in GitHub Desktop.
Save seleniumgists/19857d71e04d47eb941e1ff6a13bbaae to your computer and use it in GitHub Desktop.
generated automatically from #selenium on seleniumhq slack
options.AddUserProfilePreference("profile.block_third_party_cookies", false);```
```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);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment