From 6ce1744131cae5accdca05fff5b85ab128e4e9d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dar=C3=ADo=20Kondratiuk?= Date: Wed, 2 Jul 2025 12:50:53 -0300 Subject: [PATCH 1/7] Bidi unlock prerender tests --- .../TestExpectations/TestExpectations.local.json | 15 --------------- .../PrerenderTests/PrerenderTests.cs | 1 - 2 files changed, 16 deletions(-) diff --git a/lib/PuppeteerSharp.Nunit/TestExpectations/TestExpectations.local.json b/lib/PuppeteerSharp.Nunit/TestExpectations/TestExpectations.local.json index cfe6877c4..d8800477a 100644 --- a/lib/PuppeteerSharp.Nunit/TestExpectations/TestExpectations.local.json +++ b/lib/PuppeteerSharp.Nunit/TestExpectations/TestExpectations.local.json @@ -1822,19 +1822,4 @@ "FAIL" ] }, - { - "comment": "This is part of organizing the webdriver bidi implementation, We will remove it one by one", - "testIdPattern": "[prerender.spec] *", - "platforms": [ - "darwin", - "linux", - "win32" - ], - "parameters": [ - "webDriverBiDi" - ], - "expectations": [ - "FAIL" - ] - } ] diff --git a/lib/PuppeteerSharp.Tests/PrerenderTests/PrerenderTests.cs b/lib/PuppeteerSharp.Tests/PrerenderTests/PrerenderTests.cs index 09e452d19..cc998e530 100644 --- a/lib/PuppeteerSharp.Tests/PrerenderTests/PrerenderTests.cs +++ b/lib/PuppeteerSharp.Tests/PrerenderTests/PrerenderTests.cs @@ -31,7 +31,6 @@ public async Task CanNavigateToAPrerenderedPageViaPuppeteer() var button = await Page.WaitForSelectorAsync("button"); await button.ClickAsync(); - await Page.GoToAsync(TestConstants.ServerUrl + "/prerender/target.html"); Assert.That(await Page.EvaluateExpressionAsync("document.body.innerText"), Is.EqualTo("target")); } From acfb633b89f33fb90d05022093da61e6eee27d64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dar=C3=ADo=20Kondratiuk?= Date: Wed, 2 Jul 2025 12:54:35 -0300 Subject: [PATCH 2/7] remove comma --- .../TestExpectations/TestExpectations.local.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PuppeteerSharp.Nunit/TestExpectations/TestExpectations.local.json b/lib/PuppeteerSharp.Nunit/TestExpectations/TestExpectations.local.json index d8800477a..ed0535660 100644 --- a/lib/PuppeteerSharp.Nunit/TestExpectations/TestExpectations.local.json +++ b/lib/PuppeteerSharp.Nunit/TestExpectations/TestExpectations.local.json @@ -1821,5 +1821,5 @@ "expectations": [ "FAIL" ] - }, + } ] From 4878f4450cabdf03c2669b0206c3366e31253f23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dar=C3=ADo=20Kondratiuk?= Date: Wed, 2 Jul 2025 13:48:24 -0300 Subject: [PATCH 3/7] fix --- .../TestExpectations.local.json | 15 -------------- .../TestExpectations.upstream.json | 20 ++++++++++++++----- 2 files changed, 15 insertions(+), 20 deletions(-) diff --git a/lib/PuppeteerSharp.Nunit/TestExpectations/TestExpectations.local.json b/lib/PuppeteerSharp.Nunit/TestExpectations/TestExpectations.local.json index ed0535660..bc8460cbb 100644 --- a/lib/PuppeteerSharp.Nunit/TestExpectations/TestExpectations.local.json +++ b/lib/PuppeteerSharp.Nunit/TestExpectations/TestExpectations.local.json @@ -1762,21 +1762,6 @@ "FAIL" ] }, - { - "comment": "This is part of organizing the webdriver bidi implementation, We will remove it one by one", - "testIdPattern": "[DeviceRequestPrompt.test.ts] *", - "platforms": [ - "darwin", - "linux", - "win32" - ], - "parameters": [ - "webDriverBiDi" - ], - "expectations": [ - "FAIL" - ] - }, { "comment": "This is part of organizing the webdriver bidi implementation, We will remove it one by one", "testIdPattern": "[launcher.spec] PuppeteerSharp *", diff --git a/lib/PuppeteerSharp.Nunit/TestExpectations/TestExpectations.upstream.json b/lib/PuppeteerSharp.Nunit/TestExpectations/TestExpectations.upstream.json index ee7ae3f6a..d75627429 100644 --- a/lib/PuppeteerSharp.Nunit/TestExpectations/TestExpectations.upstream.json +++ b/lib/PuppeteerSharp.Nunit/TestExpectations/TestExpectations.upstream.json @@ -1568,6 +1568,7 @@ "expectations": ["SKIP"], "comment": "TODO: add a comment explaining why this expectation is required (include links to issues)" }, + { "testIdPattern": "[extensions.spec] extensions can evaluate in the service worker", "platforms": ["win32"], "parameters": ["cdp", "chrome"], @@ -3467,13 +3468,22 @@ "comment": "TODO: add a comment explaining why this expectation is required (include links to issues)" }, { - "testIdPattern": "[extensions.spec] extensions service_worker target type should be available", - "platforms": ["darwin", "linux", "win32"], - "parameters": ["cdp", "chrome", "chrome-headless-shell"], - "expectations": ["SKIP"], + "platforms": [ + "darwin", + "linux", + "win32" + ], + "parameters": [ + "cdp", + "chrome", + "chrome-headless-shell" + ], + "expectations": [ + "SKIP" + ], "comment": "TODO: add a comment explaining why this expectation is required (include links to issues)" - ], + }, { "testIdPattern": "[mouse.spec] Mouse should select the text with mouse", "platforms": ["win32"], From bfdc0d3e3044a5b96371b64de9d333218186e3ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dar=C3=ADo=20Kondratiuk?= Date: Thu, 3 Jul 2025 10:51:12 -0300 Subject: [PATCH 4/7] some progress --- lib/PuppeteerSharp/Bidi/BidiElementHandle.cs | 3 - lib/PuppeteerSharp/Bidi/BidiFrameRealm.cs | 35 +++++--- lib/PuppeteerSharp/Bidi/BidiJSHandle.cs | 15 +++- lib/PuppeteerSharp/Bidi/BidiRealm.cs | 84 ++++++++++++++++---- lib/PuppeteerSharp/Bidi/Core/Realm.cs | 4 + lib/PuppeteerSharp/Bidi/Core/Session.cs | 2 + lib/PuppeteerSharp/Cdp/CdpElementHandle.cs | 14 ---- lib/PuppeteerSharp/ElementHandle.cs | 16 +++- lib/PuppeteerSharp/PuppeteerSharp.csproj | 2 +- 9 files changed, 128 insertions(+), 47 deletions(-) diff --git a/lib/PuppeteerSharp/Bidi/BidiElementHandle.cs b/lib/PuppeteerSharp/Bidi/BidiElementHandle.cs index b3fb070ac..fb8a0a614 100644 --- a/lib/PuppeteerSharp/Bidi/BidiElementHandle.cs +++ b/lib/PuppeteerSharp/Bidi/BidiElementHandle.cs @@ -21,7 +21,6 @@ // * SOFTWARE. using System.Threading.Tasks; -using PuppeteerSharp.Cdp.Messaging; using PuppeteerSharp.QueryHandlers; using WebDriverBiDi.Script; @@ -47,8 +46,6 @@ public static IJSHandle From(RemoteValue value, BidiRealm realm) return new BidiElementHandle(value, realm); } - public override ValueTask DisposeAsync() => throw new System.NotImplementedException(); - public override Task UploadFileAsync(bool resolveFilePaths, params string[] filePaths) => throw new System.NotImplementedException(); public override Task