[Feature] Document that non-fixture contexts/pages should be closed when no longer needed
See original GitHub issueWhen a BrowserContext
is not obtained from a Playwright Test fixture, but from browser.newContext()
in a test or when using Playwright Library, it should be closed once no longer needed (according to @mxschmitt at https://stackoverflow.com/questions/72284057/do-playwright-browser-contexts-opened-manually-need-to-be-closed?noredirect=1#comment127709001_72284057). Similarly pages from context/browser.newPage()
should be closed if they are no longer needed and the context is long-living.
However, I wasn’t able to find any place in documentation and examples saying this; the only hint was the existence of close
methods. Please consider documenting it.
Issue Analytics
- State:
- Created a year ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
playwright - bytemeta
[Feature] Document that non-fixture contexts/pages should be closed when no longer needed · I face many times element not visible or hiddend in...
Read more >Raw `Result` in redaction macro - Google/Argh - IssueHint
[Feature] Document that non-fixture contexts/pages should be closed when no longer needed, 1, 2022-05-18 ; Anchor generation - grid point or sliding window ......
Read more >How to solve the hyper-parameter dependency in search space ...
YOU MAY BE INTERESTED ; [Feature] Document that non-fixture contexts/pages should be closed when no longer needed, 5, 2022-05-18, 2022-09-08 ; MiniEngine ...
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 Free
Top 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
It’s already mentioned in https://playwright.dev/docs/api/class-browsercontext – at the end of the first code snippet
Closing as part of triage per above.