diff --git a/lib/PuppeteerSharp.Nunit/TestExpectations/TestExpectations.local.json b/lib/PuppeteerSharp.Nunit/TestExpectations/TestExpectations.local.json index cfe6877c4..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 *", @@ -1821,20 +1806,5 @@ "expectations": [ "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.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"], diff --git a/lib/PuppeteerSharp.Tests/NavigationTests/PageGotoTests.cs b/lib/PuppeteerSharp.Tests/NavigationTests/PageGotoTests.cs index 995ae0cfe..ed7ea1006 100644 --- a/lib/PuppeteerSharp.Tests/NavigationTests/PageGotoTests.cs +++ b/lib/PuppeteerSharp.Tests/NavigationTests/PageGotoTests.cs @@ -507,7 +507,7 @@ await Task.WhenAll( Server.WaitForRequest("/digits/1.png", r => referer2 = r.Headers["Referer"]), Page.GoToAsync(TestConstants.ServerUrl + "/grid.html", new NavigationOptions { - ReferrerPolicy = "no-referer" + ReferrerPolicy = "no-referrer" }) ); 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")); } diff --git a/lib/PuppeteerSharp/Bidi/BidiElementHandle.cs b/lib/PuppeteerSharp/Bidi/BidiElementHandle.cs index b3fb070ac..70d6a738a 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; @@ -40,15 +39,15 @@ internal class BidiElementHandle(RemoteValue value, BidiRealm realm) : ElementHa internal override CustomQuerySelectorRegistry CustomQuerySelectorRegistry { get; } = new(); - protected override Page Page { get; } + internal BidiFrame BidiFrame => realm.Environment as BidiFrame; + + protected override Page Page => BidiFrame.BidiPage; 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