The Playwright debugging tool Rails devs aren't using
This title could be clearer and more informative.Try out Clickbait Shieldfor free (5 uses left this month).
Playwright's Trace Viewer is a powerful debugging tool that records screenshots, DOM snapshots, network requests, and console output for every test action. Most Rails developers using Capybara with playwright-ruby-client aren't taking advantage of it. A single RSpec configuration block in rails_helper.rb enables tracing, saving trace zips only for failed tests. These can be uploaded as CI artifacts via GitHub Actions and inspected locally with `npx playwright show-trace`. The post covers implementation details, gotchas (like why before(:each) is used over around), and a ramdisk workaround for I/O-constrained CI environments.
Table of contents
What’s in a Playwright trace?Enable Playwright traces in your Rails appDownload traces from CI for debuggingOpen a traceGotchasDebug, don’t guessIf you enjoyed this post, you might also like:163 Impressions