Skip to content

Commit cfc1030

Browse files
authored
docs: add note about time.sleep (microsoft#698)
1 parent a69de3d commit cfc1030

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ Headless execution is supported for all browsers on all platforms.
2222
- [Mobile and geolocation](#mobile-and-geolocation)
2323
- [Evaluate JS in browser](#evaluate-js-in-browser)
2424
- [Intercept network requests](#intercept-network-requests)
25+
- [Known issues](#known-issues)
2526
- [Documentation](#documentation)
2627

2728
## Usage - pip
@@ -298,6 +299,12 @@ asyncio.run(main())
298299

299300
</details>
300301

302+
## Known issues
303+
304+
### `time.sleep()` leads to outdated state
305+
306+
You need to use `page.wait_for_timeout(5000)` instead of `time.sleep()`. It is better to not wait for a timeout at all, but sometimes it is useful for debugging. In these cases, use our wait method instead of the system one. This is because we internally rely on asynchronous operations and when using `time.sleep(5)` they can't get processed correctly.
307+
301308
## Documentation
302309

303310
Check out our [new documentation site](https://playwright.dev/python/docs/intro)!

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy