From 2d44dc7eb4b4faab9f60b24c05f162ad7b5c90a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dar=C3=ADo=20Kondratiuk?= Date: Wed, 7 Aug 2024 21:34:36 -0300 Subject: [PATCH] Close page on disposal (#2720) --- lib/PuppeteerSharp/Page.cs | 6 ------ lib/PuppeteerSharp/PuppeteerSharp.csproj | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/lib/PuppeteerSharp/Page.cs b/lib/PuppeteerSharp/Page.cs index 8157cbc3d..b85a3dfd4 100644 --- a/lib/PuppeteerSharp/Page.cs +++ b/lib/PuppeteerSharp/Page.cs @@ -752,12 +752,6 @@ public async ValueTask DisposeAsync() { try { - // We don't want to close the page if we're connected to the browser using `Connect`. - if (Browser.Launcher == null) - { - return; - } - await CloseAsync().ConfigureAwait(false); } catch diff --git a/lib/PuppeteerSharp/PuppeteerSharp.csproj b/lib/PuppeteerSharp/PuppeteerSharp.csproj index 0806d4fc9..715cbb5a9 100644 --- a/lib/PuppeteerSharp/PuppeteerSharp.csproj +++ b/lib/PuppeteerSharp/PuppeteerSharp.csproj @@ -12,7 +12,7 @@ Headless Browser .NET API PuppeteerSharp - 18.1.0-beta1 + 18.1.0 18.1.0 18.1.0 18.1.0