Comments (3)
We strongly discourage the use of networkidle
. It is inherently flaky, buy design, so your scripts are guaranteed to flake or break. It might be not obvious, but you can only use networkidle
if you control the page and should never use it on a page from the wild. When you control the page you can make assumptions regarding its network organization, while on the real world pages you can't rely on anything. Every other real world page will have a long poll for ads, so networkidle will never occur. Or will have load / web vitals optimizations that would trigger networkidle before the page is loaded, etc etc.
There is no universal way to detect when the page is loaded. Search engines handle it with some success, exploring SEO will give some clue on how. Web vitals will give some interesting signals that can also be used. Virtual clock and other techniques are also worth exploring.
from playwright.
@pavelfeldman Thanks very much for your explanation and guidance. I will research the topics you mentioned.
from playwright.
Closing as per above, please feel free to open a new issue if this does not cover your use case.
from playwright.
Related Issues (20)
- Logout verification for parallel tests with login thru global setup with single user
- [Bug]: Chromium browsers does not respect locale option (no use of Accept-Language header) for WebSocket connections HOT 2
- [Bug]: [GUI] Locator Code Generator improper escaping and inverted frame order HOT 1
- [Bug]: beforeEach and afterEach hooks not running in sync for tests that are skipped at runtime HOT 3
- [Bug]: After disabling BlockInsecurePrivateNetworkRequests in chrome://flags/, the function to upload attachments becomes non-functional.
- [Feature]: Allow to pass components and functions to hooks config HOT 3
- [Bug]: Parallel test process execution causing race condition and empty babel transpiled file read from disk cache HOT 6
- I am getting TypeError: Cannot read properties of undefined (reading 'waitForEvent') fo handling multiple windows in playwright HOT 1
- How to get the selected options label text for a multi-select dropdown? HOT 2
- [Docs]: Component testing API reference HOT 1
- [Feature]: consider to invoke `Emulation.setEmitTouchEventsForMouse` for `isMobile:true` devices HOT 5
- [Feature]: Accessing the expect timeout configuration from custom matcher
- [Bug]: WebGL fails in GitHub Actions on macOS (launcher by Web Test Runner) HOT 2
- [Bug]: HIght CPU usage when using chromium HOT 1
- [Bug]: Starting local server from Playwright is taking longer testing time HOT 2
- [Bug]: Playwright CT 1.43.1 throws Vite/Rollup error when testing MUI HOT 1
- [Feature]: press enter in contenteditable doesn't make keypress code in codegen
- [Bug]: trace stop_chunk. the network in chunk includes the network data from the previous chunk HOT 1
- [Bug]: False Notification: "Host system is missing dependencies to run browsers" HOT 2
- goto method failing with timeout error: HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from playwright.