-
Notifications
You must be signed in to change notification settings - Fork 297
Open
Description
Version
1.58.0
Steps to reproduce
I am encountering an issue where browser.IsConnected remains true even after the underlying Node.js process and the browser process have exited unexpectedly on Windows.
var playwright = await Playwright.CreateAsync();
var browserLauchOptions = new BrowserTypeLaunchOptions
{
Headless = false,
Channel = "chrome",
};
var browser = await playwright.Chromium.LaunchAsync(browserLauchOptions);
Console.WriteLine(browser.IsConnected ? "Browser is still connected" : "Browser is not connected");
await browser.CloseAsync();
await browser.DisposeAsync();
Console.WriteLine(browser.IsConnected ? "Browser is still connected" : "Browser is not connected");
- Start the sample program above.
- After the browser is launched, manually terminate the Node.js process associated with Playwright (e.g., via Task Manager).
- Observe the output of the two Console.WriteLine statements.
Expected behavior
If the Node.js process or the browser process is terminated, browser.IsConnected should reflect the actual connection state and return false.
Actual behavior
Both logs print "Browser is still connected", even though the Node.js and Chrome processes have ended (as confirmed in Task Manager).
Additional context
No response
Environment
OS: Windows
Playwright for .NET version: 1.58.0
Browser: Chrome (via Channel = "chrome")
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels