Emulate offline
See original GitHub issue(taken from https://github.com/gr2m/headless-chrome-test/issues/1)
Puppeteer should have an offline mode to test PWA’s. For example:
page.setOfflineMode(true);
Emulation of other network conditions might be useful as well, but we can wait with them until there are good scenarios.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:11 (6 by maintainers)
Top Results From Across the Web
Off-line emulators - RetroGames.cz
Here you can legally download emulators for off-line emulation of selected videogame consoles. Unlike online emulation, you can play all games in full ......
Read more >Android emulator-5554 offline - Stack Overflow
The problem is when I try to install .apk files to the emulator using abd install <path> from the command prompt, it tells...
Read more >How to effectively simulate "offline" mode in dev mode - help
I am writing some offline-first features for my app and I found, that it does not simulate the offline mode for the DDP...
Read more >Network automation to emulate offline mode only works with ...
I can turn the offline mode using CDP and confirm the window.navigator. ... Network automation to emulate offline mode only works with ...
Read more >How to Test Mobile Apps in Offline Mode | BrowserStack
Note that network simulation is not possible through other Emulators and Simulators, making BrowserStack the go-to platform for rigorous app ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
wait, we still want to have
page.setOfflineMode
implemented 😃If you don’t want to run as root but still want to have some level of automated traffic shaping (even if low fidelity). Then what you’d want to do is setup a proxy for those tests. Do it where any tests that need throttling use an instance that is talking to your proxy that will handle the network manipulation. You’d pass the proxy in when launching an instance just like you would from the command line as an
arg
option.This allows you to use other external tools to manage the network shaping. Such as Charles Proxy on Mac OS. Finding a good cross-platform solution for testing is difficult though, as Windows in particular is dramatically different to talk to.