Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lib/PuppeteerSharp.Tests/CookiesTests/SetCookiesTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,9 @@ await Page.SetCookieAsync(new CookieParam
Value = "123456",
Domain = "localhost",
Path = "/",
#pragma warning disable CS0618 // SameParty is deprecated
SameParty = false,
#pragma warning restore CS0618
Expires = -1,
HttpOnly = false,
Secure = false,
Expand Down
2 changes: 2 additions & 0 deletions lib/PuppeteerSharp/Bidi/BidiCookieHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,12 @@ public static PartialCookie PuppeteerToBidiCookie(CookieParam cookie, string dom
}

// Add CDP-specific properties if needed
#pragma warning disable CS0618 // SameParty is deprecated
if (cookie.SameParty.HasValue)
{
bidiCookie.AdditionalData["goog:sameParty"] = cookie.SameParty.Value;
}
#pragma warning restore CS0618

if (cookie.SourceScheme.HasValue)
{
Expand Down
4 changes: 3 additions & 1 deletion lib/PuppeteerSharp/CookieParam.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System;
using System.Text.Json.Serialization;
using PuppeteerSharp.Helpers.Json;

Expand Down Expand Up @@ -82,8 +83,9 @@ public class CookieParam
public CookiePriority? Priority { get; set; }

/// <summary>
/// True if cookie is SameParty. Supported only in Chrome.
/// Always set to false. Supported only in Chrome.
/// </summary>
[Obsolete("SameParty is deprecated and always ignored.")]
public bool? SameParty { get; set; }

/// <summary>
Expand Down
Loading