-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
Closed
Labels
A-needs-triagingA Selenium member will evaluate this soon!A Selenium member will evaluate this soon!C-dotnet.NET Bindings.NET BindingsD-chromeG-chromedriverRequires fixes in ChromeDriverRequires fixes in ChromeDriverI-defectSomething is not working as intendedSomething is not working as intendedI-regressionSomething was working but we "fixed" itSomething was working but we "fixed" itOS-windows
Description
Description
Hello all,
Since Chrome was updated to version 139, I have not been able to allow third-party cookies in Incognito mode.

I have tried several approaches to enable third-party cookies, but all of them have failed. Everything was working correctly up to and including version 138. Starting with version 139, none of the previous configurations work, and when I click on the lock icon next to the URL bar, the cookies setting shows as blocked.
At this point, I’m not sure whether this is a Selenium issue or a new Chrome feature/change.
Reproducible Code
public void InitDriver(ref IWebDriver driver, bool isMobile = false)
{
var options = new ChromeOptions();
// --- Browser mode ---
options.AddArgument("--incognito");
options.AddArgument("--start-maximized");
options.AddArgument("--no-sandbox");
options.AddArgument("--disable-dev-shm-usage");
// --- Feature flags ---
options.AddArgument("--disable-features=BlockInsecurePrivateNetworkRequests,ThirdPartyCookiesBlocking");
options.AddArguments("--disable-search-engine-choice-screen");
// --- Cookie & content preferences ---
options.AddUserProfilePreference("profile.default_content_setting_values.cookies", 1); // Allow cookies
options.AddUserProfilePreference("profile.block_third_party_cookies", false); // Allow 3rd party cookies
options.AddUserProfilePreference("profile.cookie_controls_mode", 0); // Disable cookie controls
// --- Download preferences ---
options.AddUserProfilePreference("download.prompt_for_download", false);
// --- Logging ---
options.SetLoggingPreference(LogType.Browser, LogLevel.All);
// --- Driver setup ---
string version = new DriverManager().SetUpDriver(
new ChromeConfig(),
VersionResolveStrategy.MatchingBrowser
);
string driverPath = version.Substring(0, version.LastIndexOf(@"\"));
driver = new ChromeDriver(driverPath, options);
}
ℹ️ Last known working version: 4.35
Metadata
Metadata
Assignees
Labels
A-needs-triagingA Selenium member will evaluate this soon!A Selenium member will evaluate this soon!C-dotnet.NET Bindings.NET BindingsD-chromeG-chromedriverRequires fixes in ChromeDriverRequires fixes in ChromeDriverI-defectSomething is not working as intendedSomething is not working as intendedI-regressionSomething was working but we "fixed" itSomething was working but we "fixed" itOS-windows