You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using playwright-go in the following way. I create 10 contexts. Each context creates its page, performs a log-in operation in the app, and then joins chat rooms with fake audio and video devices that I've configured with Chromium flags. The app continues to run until I send a SIGTERM to it.
After some tests, I've noticed that the test clients that are being created in such a way do disappear shortly after being started (despite the test application with playwright running).
That was a bummer as I expected the Chromium instances to remain open until the app ended or the playwright, context, or page are closed.
I removed the headless flag to see what happens and noticed that the Chromium windows just get closed by the playwright for some unknown reason.
I tried to work with the persistent context to workaround it, but it did not change anything, unfortunately.
The text was updated successfully, but these errors were encountered:
Thanks, @marc136. Yeah, I've tried Pause() and also different wait-functions, but unfortunately they did not have the intended effect. The Pause() paused the execution of the JavaScript (which I did not want as I needed the page to continue execution and reaction to the incoming events). And the wait functions did not seem to have any effect at all (Playwright kept closing windows if they were in a waiting state). I suppose it's either some sort of a bug or expected behavior that might have a simple solution that I'm just not aware of 🙂
I went for a workaround by rewriting it in Rust using rust-headless-chrome that relies upon Chrome DevTools Protocol, so its API surface is very similar to Playwright. Surprisingly, it does not exhibit the same issue and worked just fine for my use case.
I'm using
playwright-go
in the following way. I create 10 contexts. Each context creates its page, performs a log-in operation in the app, and then joins chat rooms with fake audio and video devices that I've configured with Chromium flags. The app continues to run until I send aSIGTERM
to it.After some tests, I've noticed that the test clients that are being created in such a way do disappear shortly after being started (despite the test application with playwright running).
That was a bummer as I expected the Chromium instances to remain open until the app ended or the playwright, context, or page are closed.
I removed the headless flag to see what happens and noticed that the Chromium windows just get closed by the playwright for some unknown reason.
I tried to work with the persistent context to workaround it, but it did not change anything, unfortunately.
The text was updated successfully, but these errors were encountered: