mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
487 B
487 B
async method: Playwright.stop
- langs: python
Terminates this instance of Playwright in case it was created bypassing the Python context manager. This is useful in REPL applications.
>>> from playwright import sync_playwright
>>> playwright = sync_playwright().start()
>>> browser = playwright.chromium.launch()
>>> page = browser.newPage()
>>> page.goto("http://whatsmyuseragent.org/")
>>> page.screenshot(path="example.png")
>>> browser.close()
>>> playwright.stop()