Tracing
You can use tracing.record to create a trace file which can be opened in Chrome DevTools or
timeline viewer.
page.tracing.record(path: "trace.json") do
page.go_to("https://www.google.com")
end
tracing.record(**options) : String
Accepts block, records trace and by default returns trace data from Tracing.tracingComplete event as output. When
path is specified returns true and stores trace data into file.
- options
Hash- :path
Stringsave data on the disk,nilby default - :encoding
Symbol:base64|:binaryencode output as Base64 or plain text.:binaryby default - :timeout
Floatwait until file streaming finishes in the specified time or raise error, defaults tonil - :screenshots
Booleancapture screenshots in the trace,falseby default - :trace_config
Hash<String, Object>config for trace, for categories see getCategories, only one trace config can be active at a time per browser.
- :path