Method: Playwright::Browser#start_tracing

Defined in:
lib/playwright_api/browser.rb

#start_tracing(page: nil, categories: nil, path: nil, screenshots: nil) ⇒ Object

> NOTE: This API controls [Chromium Tracing](www.chromium.org/developers/how-tos/trace-event-profiling-tool) which is a low-level chromium-specific debugging tool. API to control [Playwright Tracing](../trace-viewer) could be found [here](./class-tracing).

You can use [‘method: Browser.startTracing`] and [`method: Browser.stopTracing`] to create a trace file that can be opened in Chrome DevTools performance panel.

“‘python sync browser.start_tracing(page, path=“trace.json”) page.goto(“www.google.com”) browser.stop_tracing() “`



151
152
153
# File 'lib/playwright_api/browser.rb', line 151

def start_tracing(page: nil, categories: nil, path: nil, screenshots: nil)
  wrap_impl(@impl.start_tracing(page: unwrap_impl(page), categories: unwrap_impl(categories), path: unwrap_impl(path), screenshots: unwrap_impl(screenshots)))
end