diff --git a/lib/PuppeteerSharp.Nunit/TestExpectations/TestExpectations.local.json b/lib/PuppeteerSharp.Nunit/TestExpectations/TestExpectations.local.json index 6e3206240..b888bf8f1 100644 --- a/lib/PuppeteerSharp.Nunit/TestExpectations/TestExpectations.local.json +++ b/lib/PuppeteerSharp.Nunit/TestExpectations/TestExpectations.local.json @@ -107,7 +107,7 @@ }, { "comment": "This is part of organizing the webdriver bidi implementation, We will remove it one by one", - "testIdPattern": "[browser.spec] *Browser.process*", + "testIdPattern": "[browser.spec] *should not return child_process for remote browser*", "platforms": [ "darwin", "linux", diff --git a/lib/PuppeteerSharp/Bidi/BidiBrowser.cs b/lib/PuppeteerSharp/Bidi/BidiBrowser.cs index 64bbed1a7..abb2f3dd8 100644 --- a/lib/PuppeteerSharp/Bidi/BidiBrowser.cs +++ b/lib/PuppeteerSharp/Bidi/BidiBrowser.cs @@ -142,7 +142,8 @@ public override async Task CreateBrowserContextAsync(BrowserCon internal static async Task CreateAsync( BiDiDriver driver, LaunchOptions options, - ILoggerFactory loggerFactory) + ILoggerFactory loggerFactory, + LauncherBase launcher) { var session = await Session.FromAsync( driver, @@ -164,7 +165,7 @@ await session.SubscribeAsync( ? SubscribeModules : [.. SubscribeModules, .. SubscribeCdpEvents]).ConfigureAwait(false); - var browser = new BidiBrowser(session.Browser, options, loggerFactory); + var browser = new BidiBrowser(session.Browser, options, loggerFactory) { Launcher = launcher }; browser.InitializeAsync(); return browser; } diff --git a/lib/PuppeteerSharp/Launcher.cs b/lib/PuppeteerSharp/Launcher.cs index 8bbf5b6dd..95a3abefb 100644 --- a/lib/PuppeteerSharp/Launcher.cs +++ b/lib/PuppeteerSharp/Launcher.cs @@ -94,7 +94,7 @@ public async Task LaunchAsync(LaunchOptions options) { var driver = new BiDiDriver(TimeSpan.FromMilliseconds(options.ProtocolTimeout)); await driver.StartAsync(Process.EndPoint + "/session").ConfigureAwait(false); - browser = await BidiBrowser.CreateAsync(driver, options, _loggerFactory).ConfigureAwait(false); + browser = await BidiBrowser.CreateAsync(driver, options, _loggerFactory, Process).ConfigureAwait(false); } else {