microsoft / playwright-dotnet

.NET version of the Playwright testing and automation library.

Home Page:https://playwright.dev/dotnet/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug]: Web Browser opening many times on a disabled Headless Mode

victorperez2911 opened this issue · comments

Version

1.43.0

Steps to reproduce

  1. Create a new Project from Visual Studio 2022 NUnit Template.
  2. Update Nuget packages of project.
  3. Run powershell file for install Browsers.
  4. Add *.runsettings xml file on root project folder.
  5. Add Playwright xml section , and set headless property to false.
  6. Add RunSettingsFilePath property on csproj file, pointing to runsettings xml file from step 4.
  7. write a test method in a Test Class.
  8. Run Tests.

Expected behavior

Test Browser close on end of tests run.

Actual behavior

The Test Browser continues to open and close several times even after the tests have finished running.

The VS Test View page even reported that the tests were finished, and after a few seconds, the test browser opens again, and repeats the tests without even reaching the C# code breakpoints.

Additional context

No response

Environment

- Operating System: Windows 11
- CPU: [arm64]
- Browser: [Chromium]
- .NET Version (TFM): [net8.0]
- Other info:

Would it be possible to provide a full reproduction in form of a repository or share a test-file with us?

commented

Hi! We have a similar problem, if we run a singel test from Visual studio (via the test explorer), the test is run but after that Visual Studio starts to run all the tests in the project. The Test Explorer reports that the test has finished and does not indicate that any running are running. We must close Visual studio to make the test runs stop.

We are runing Visual Studio Proffesional 17.9.6 and Playwright version 1.43.0 (Microsoft.Playwright.MSTest) and we had the same issue with 1.40.0. I'm not sure when this problem started... but I think we did not have this issue a couple of weeks ago. The only changes we are aware of after the problem started is that we updated VS and .NET 8 SDK. (we are running the latest versions) but I'm not sure if it started directly after the update.

Regards Hans

@hoaol Would it be possible to provide a full reproduction in form of a repository or share a test-file with us?

commented

I will see if I create a "stripped" version of our project...