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
{{ message }}
Repository navigation
[Feature] Allow display-mode media query to be emulated for standalone PWA #26853
I would like to be able to run tests with the app (a PWA) in standalone mode, as though it had been installed as a desktop/home page app.
Use case: The app code needs to adapt to whether it is in browser or standalone mode and fine tune the UI, for example to add a back navigation UI in the absence of a browser Back button. I need to test that these changes work but I can’t figure out how to do it. Playwright always runs the tests in regular browser mode.
My app tests the mode at runtime with a media query:
Pavel Feldman (@pavelfeldman) Starting chromium with something like the code below seems like it should be enough to force the browser into standalone mode, but the --app flag is being ignored. Do you know why? Is this expected behaviour to ignore certain flags?
var Browser = await PlaywrightMain.Chromium.LaunchAsync(new BrowserTypeLaunchOptions { Headless = false, Args = new string[] { "--app=https://url-for-pwa" } });
Thank you for your involvement. This issue was closed due to limited engagement (upvotes/activity), lack of recent activity, and insufficient actionability. To maintain a manageable database, we prioritize issues based on these factors.
If you disagree with this closure, please open a new issue and reference this one. More support or clarity on its necessity may prompt a review. Your understanding and cooperation are appreciated.
Activity
MattHorrocksNetwealth commentedon Mar 13, 2024
Ben Staveley-Taylor (@BenStaveleyTaylor)
I have the same requirement as you! Did you find any work arounds for this?
BenStaveleyTaylor commentedon Mar 13, 2024
MattHorrocksNetwealth No, sorry. I am not working in this area any more so will leave it to the Playwright team to comment further.
MattHorrocksNetwealth commentedon Mar 14, 2024
Pavel Feldman (@pavelfeldman) Starting chromium with something like the code below seems like it should be enough to force the browser into standalone mode, but the
--appflag is being ignored. Do you know why? Is this expected behaviour to ignore certain flags?var Browser = await PlaywrightMain.Chromium.LaunchAsync(new BrowserTypeLaunchOptions { Headless = false, Args = new string[] { "--app=https://url-for-pwa" } });pavelfeldman commentedon Aug 16, 2024
Why was this issue closed?
Thank you for your involvement. This issue was closed due to limited engagement (upvotes/activity), lack of recent activity, and insufficient actionability. To maintain a manageable database, we prioritize issues based on these factors.
If you disagree with this closure, please open a new issue and reference this one. More support or clarity on its necessity may prompt a review. Your understanding and cooperation are appreciated.
Scheepers-db commentedon Mar 6, 2026
This would be great as a way of testing WebView embedded pages
feat(cdo-12): cross all seven lattice axes — 375 pairs resolved