Module: Specbook::Recorders::TraceVisitPatch
- Defined in:
- lib/specbook/recorders/playwright_trace.rb
Overview
Patch visit to start tracing on first navigation
Instance Method Summary collapse
Instance Method Details
#visit(path) ⇒ Object
37 38 39 40 41 42 43 44 45 |
# File 'lib/specbook/recorders/playwright_trace.rb', line 37 def visit(path, **) if !@_trace_started && page.driver.respond_to?(:with_playwright_page) page.driver.with_playwright_page do |pw_page| pw_page.context.tracing.start(screenshots: true, snapshots: true, sources: false) end @_trace_started = true end super end |