Versions in this module Expand all Collapse all v0 v0.9.0 Jul 12, 2026 v0.8.0 Mar 30, 2026 v0.7.0 Mar 29, 2026 v0.6.0 Mar 29, 2026 Changes in this version + const CPU2xSlowdown + const CPU4xSlowdown + const CPU6xSlowdown + const CPUNoThrottle + const CSSStartRuleUsageTracking + const CSSStopRuleUsageTracking + const CSSTakeCoverageDelta + const DebuggerDisable + const DebuggerEnable + const EmulationSetCPUThrottlingRate + const ExtensionsGetAll + const ExtensionsLoadUnpacked + const ExtensionsUninstall + const HeapProfilerAddHeapSnapshotChunk + const HeapProfilerDisable + const HeapProfilerEnable + const HeapProfilerTakeHeapSnapshot + const LogDisable + const LogEnable + const LogEntryAdded + const NetworkDisable + const NetworkEmulateConditions + const NetworkEnable + const NetworkGetResponseBody + const PageScreencastFrame + const PageScreencastFrameAck + const PageStartScreencast + const PageStopScreencast + const ProfilerDisable + const ProfilerEnable + const ProfilerStartPreciseCoverage + const ProfilerStopPreciseCoverage + const ProfilerTakePreciseCoverage + const RuntimeConsoleAPICalled + const RuntimeDisable + const RuntimeEnable + const RuntimeExceptionThrown + var Network4G = NetworkConditions + var NetworkFast3G = NetworkConditions + var NetworkOffline = NetworkConditions + var NetworkSlow3G = NetworkConditions + var NetworkWifi = NetworkConditions + func DiscoverAny() (port int, wsEndpoint string, err error) + func DiscoverFromProcess(pid int) (port int, wsEndpoint string, err error) + func DiscoverFromRunningChrome() (port int, wsEndpoint string, err error) + func DiscoverFromUserDataDir(userDataDir string) (port int, wsEndpoint string, err error) + type BrowserInfo struct + Browser string + BrowserWSEndpoint string + Port int + ProtocolVersion string + UserAgent string + V8Version string + WebKitVersion string + func GetBrowserInfo(ctx context.Context, port int) (*BrowserInfo, error) + type CSSRuleUsage struct + EndOffset float64 + StartOffset float64 + StyleSheetID string + Used bool + type CallFrame struct + ColumnNumber int + FunctionName string + LineNumber int + ScriptID string + URL string + type Client struct + func NewClient() *Client + func (c *Client) ClearCPUThrottling(ctx context.Context) error + func (c *Client) ClearNetworkConditions(ctx context.Context) error + func (c *Client) Close() error + func (c *Client) Connect(ctx context.Context, url string) error + func (c *Client) DisableNetwork(ctx context.Context) error + func (c *Client) EnableNetwork(ctx context.Context) error + func (c *Client) GetAllExtensions(ctx context.Context) ([]ExtensionInfo, error) + func (c *Client) GetResponseBody(ctx context.Context, requestID string, saveTo string) (*ResponseBody, error) + func (c *Client) IsConnected() bool + func (c *Client) LoadUnpackedExtension(ctx context.Context, path string) (string, error) + func (c *Client) OnEvent(method string, handler EventHandler) + func (c *Client) RemoveEventHandlers(method string) + func (c *Client) Send(ctx context.Context, method string, params interface{}) (json.RawMessage, error) + func (c *Client) SetCPUThrottlingRate(ctx context.Context, rate int) error + func (c *Client) SetNetworkConditions(ctx context.Context, conditions NetworkConditions) error + func (c *Client) TakeHeapSnapshot(ctx context.Context, path string) (*HeapSnapshot, error) + func (c *Client) URL() string + func (c *Client) UninstallExtension(ctx context.Context, id string) error + type ConsoleDebugger struct + func NewConsoleDebugger(client *Client) *ConsoleDebugger + func (d *ConsoleDebugger) Clear() + func (d *ConsoleDebugger) Disable(ctx context.Context) error + func (d *ConsoleDebugger) Enable(ctx context.Context) error + func (d *ConsoleDebugger) Entries() []ConsoleEntry + func (d *ConsoleDebugger) Errors() []ExceptionDetails + func (d *ConsoleDebugger) IsEnabled() bool + func (d *ConsoleDebugger) Logs() []LogEntry + func (d *ConsoleDebugger) OnConsole(handler func(*ConsoleEntry)) + func (d *ConsoleDebugger) OnException(handler func(*ExceptionDetails)) + func (d *ConsoleDebugger) OnLog(handler func(*LogEntry)) + type ConsoleEntry struct + Args []RemoteObject + StackTrace *StackTrace + Text string + Timestamp float64 + Type ConsoleMessageType + type ConsoleMessageType string + const ConsoleAssert + const ConsoleClear + const ConsoleDebug + const ConsoleDir + const ConsoleDirXML + const ConsoleError + const ConsoleInfo + const ConsoleLog + const ConsoleTable + const ConsoleTrace + const ConsoleWarning + type Coverage struct + func NewCoverage(client *Client) *Coverage + func (c *Coverage) IsRunning() bool + func (c *Coverage) Start(ctx context.Context) error + func (c *Coverage) StartCSS(ctx context.Context) error + func (c *Coverage) StartJS(ctx context.Context, callCount, detailed bool) error + func (c *Coverage) Stop(ctx context.Context) (*CoverageReport, error) + func (c *Coverage) StopCSS(ctx context.Context) ([]CSSRuleUsage, error) + func (c *Coverage) StopJS(ctx context.Context) ([]ScriptCoverage, error) + type CoverageRange struct + Count int + EndOffset int + StartOffset int + type CoverageReport struct + CSS []CSSRuleUsage + JS []ScriptCoverage + func (r *CoverageReport) Summary() CoverageSummary + type CoverageSummary struct + CSSRules int + CSSUnusedRules int + CSSUsagePercent float64 + CSSUsedRules int + JSCoveredRanges int + JSFunctions int + JSScripts int + type Error struct + Code int + Data string + Message string + func (e *Error) Error() string + type Event struct + Method string + Params json.RawMessage + type EventHandler func(params json.RawMessage) + type ExceptionDetails struct + ColumnNumber int + Exception *RemoteObject + ExceptionID int + ExecutionContextID int + LineNumber int + ScriptID string + StackTrace *StackTrace + Text string + URL string + type ExtensionInfo struct + Description string + Enabled bool + ID string + Name string + Path string + Version string + type FunctionCoverage struct + FunctionName string + IsBlockCoverage bool + Ranges []CoverageRange + type GetResponseBodyResult struct + Base64Encoded bool + Body string + type HeapSnapshot struct + Path string + Size int64 + type HeapSnapshotChunk struct + Chunk string + type LogEntry struct + Level string + LineNumber int + Source string + StackTrace *StackTrace + Text string + Timestamp float64 + URL string + type Message struct + Error *Error + ID int64 + Method string + Params json.RawMessage + Result json.RawMessage + type NetworkConditions struct + ConnectionType string + DownloadThroughput float64 + Latency float64 + Offline bool + UploadThroughput float64 + type RemoteObject struct + ClassName string + Description string + ObjectID string + Subtype string + Type string + Value any + type ResponseBody struct + Base64Encoded bool + Body string + Path string + Size int + type Screencast struct + func NewScreencast(client *Client) *Screencast + func (s *Screencast) IsRunning() bool + func (s *Screencast) Start(ctx context.Context, opts *ScreencastOptions, handler ScreencastFrameHandler) error + func (s *Screencast) Stop(ctx context.Context) error + type ScreencastFormat string + const ScreencastFormatJPEG + const ScreencastFormatPNG + type ScreencastFrame struct + Data string + Metadata ScreencastMetadata + SessionID int + type ScreencastFrameHandler func(frame *ScreencastFrame) + type ScreencastMetadata struct + DeviceHeight int + DeviceWidth int + OffsetTop float64 + PageScaleFactor float64 + ScrollOffsetX float64 + ScrollOffsetY float64 + Timestamp float64 + type ScreencastOptions struct + EveryNthFrame int + Format ScreencastFormat + MaxHeight int + MaxWidth int + Quality int + type ScriptCoverage struct + Functions []FunctionCoverage + ScriptID string + URL string + type StackTrace struct + CallFrames []CallFrame + Description string + Parent *StackTrace + type Target struct + DevtoolsFrontendURL string + ID string + Title string + Type string + URL string + WebSocketDebuggerURL string + func FindPageTarget(ctx context.Context, port int, url string) (*Target, error) + func ListTargets(ctx context.Context, port int) ([]Target, error)