github microsoft/playwright-python v1.12.0

latest releases: v1.43.0, v1.42.0, v1.41.2...
2 years ago

🧟‍♂️ Introducing Playwright Trace & TraceViewer

Playwright Trace Viewer is a new GUI tool that helps exploring recorded Playwright traces after the script ran. Playwright traces let you examine:

  • page DOM before and after each Playwright action
  • page rendering before and after each Playwright action
  • browse network during script execution

Traces are recorded using the new browser_context.tracing API:

browser = chromium.launch()
context = browser.new_context()

# Start tracing before creating / navigating a page.
context.tracing.start(screenshots=True, snapshots=True)

page.goto("https://playwright.dev")

# Stop tracing and export it into a zip archive.
context.tracing.stop(path = "trace.zip")

Traces are examined later with the Playwright CLI:

playwright show-trace trace.zip

That will open the following GUI:

image

👉 Read more in trace viewer documentation.


Browser Versions

  • Chromium 93.0.4530.0
  • Mozilla Firefox 89.0
  • WebKit 14.2

This version of Playwright was also tested against the following stable channels:

  • Google Chrome 91
  • Microsoft Edge 91

New APIs

Don't miss a new playwright-python release

NewReleases is sending notifications on new releases.