chrome

package
v1.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 5, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrConnectionClosed = errors.New("connection closed")
	ErrProtocolError    = errors.New("protocol error")
)

Errors

View Source
var CommonDevices = map[string]DeviceInfo{
	"iPhone 12": {
		Name:              "iPhone 12",
		Width:             390,
		Height:            844,
		DeviceScaleFactor: 3,
		Mobile:            true,
		UserAgent:         "Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.3 Mobile/15E148 Safari/604.1",
	},
	"iPhone 12 Pro": {
		Name:              "iPhone 12 Pro",
		Width:             390,
		Height:            844,
		DeviceScaleFactor: 3,
		Mobile:            true,
		UserAgent:         "Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.3 Mobile/15E148 Safari/604.1",
	},
	"iPhone 12 Pro Max": {
		Name:              "iPhone 12 Pro Max",
		Width:             428,
		Height:            926,
		DeviceScaleFactor: 3,
		Mobile:            true,
		UserAgent:         "Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.3 Mobile/15E148 Safari/604.1",
	},
	"iPhone SE": {
		Name:              "iPhone SE",
		Width:             375,
		Height:            667,
		DeviceScaleFactor: 2,
		Mobile:            true,
		UserAgent:         "Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.3 Mobile/15E148 Safari/604.1",
	},
	"Pixel 5": {
		Name:              "Pixel 5",
		Width:             393,
		Height:            851,
		DeviceScaleFactor: 2.75,
		Mobile:            true,
		UserAgent:         "Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.91 Mobile Safari/537.36",
	},
	"Galaxy S21": {
		Name:              "Galaxy S21",
		Width:             360,
		Height:            800,
		DeviceScaleFactor: 3,
		Mobile:            true,
		UserAgent:         "Mozilla/5.0 (Linux; Android 11; SM-G991B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.91 Mobile Safari/537.36",
	},
	"iPad": {
		Name:              "iPad",
		Width:             768,
		Height:            1024,
		DeviceScaleFactor: 2,
		Mobile:            true,
		UserAgent:         "Mozilla/5.0 (iPad; CPU OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.3 Mobile/15E148 Safari/604.1",
	},
	"iPad Pro": {
		Name:              "iPad Pro",
		Width:             1024,
		Height:            1366,
		DeviceScaleFactor: 2,
		Mobile:            true,
		UserAgent:         "Mozilla/5.0 (iPad; CPU OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.3 Mobile/15E148 Safari/604.1",
	},
}

CommonDevices is a map of common device names to their configurations.

View Source
var NetworkPresets = map[string]NetworkConditions{
	"slow3g": {
		Offline:            false,
		Latency:            2000,
		DownloadThroughput: 50000,
		UploadThroughput:   25000,
	},
	"fast3g": {
		Offline:            false,
		Latency:            563,
		DownloadThroughput: 180000,
		UploadThroughput:   84375,
	},
	"4g": {
		Offline:            false,
		Latency:            170,
		DownloadThroughput: 1500000,
		UploadThroughput:   750000,
	},
	"wifi": {
		Offline:            false,
		Latency:            28,
		DownloadThroughput: 3750000,
		UploadThroughput:   1875000,
	},
}

NetworkPresets contains common network condition presets.

Functions

func FormatRemoteObject added in v1.9.0

func FormatRemoteObject(obj *RemoteObject) string

FormatRemoteObject is the exported version for use outside the package.

Types

type AccessibilityNode

type AccessibilityNode struct {
	NodeID      string                 `json:"nodeId"`
	Role        string                 `json:"role"`
	Name        string                 `json:"name,omitempty"`
	Description string                 `json:"description,omitempty"`
	Value       string                 `json:"value,omitempty"`
	Properties  map[string]interface{} `json:"properties,omitempty"`
	Children    []AccessibilityNode    `json:"children,omitempty"`
}

AccessibilityNode represents a node in the accessibility tree.

type BoundingBox

type BoundingBox struct {
	X      float64 `json:"x"`
	Y      float64 `json:"y"`
	Width  float64 `json:"width"`
	Height float64 `json:"height"`
}

BoundingBox represents an element's position and size.

type Bridge added in v1.8.0

type Bridge struct {
	Events <-chan BridgeEvent
	// contains filtered or unexported fields
}

Bridge is a persistent bidirectional message channel between the CLI and client-side JavaScript running in a browser tab.

func (*Bridge) Close added in v1.8.0

func (b *Bridge) Close()

Close shuts down the bridge and cleans up resources.

func (*Bridge) CloseIterator added in v1.8.0

func (b *Bridge) CloseIterator(ctx context.Context) error

CloseIterator signals the JS async iterator to close, allowing the script to finish cleanly. The bridge remains open to receive the final closed event.

func (*Bridge) Send added in v1.8.0

func (b *Bridge) Send(ctx context.Context, data interface{}) error

Send delivers a message to the JS async iterator.

type BridgeEvent added in v1.8.0

type BridgeEvent struct {
	Type  string      `json:"type"`
	Data  interface{} `json:"data,omitempty"`
	Error string      `json:"error,omitempty"`
}

BridgeEvent represents an event from a bridge session.

type CSSCoverageEntry

type CSSCoverageEntry struct {
	StyleSheetID string `json:"styleSheetId"`
	StartOffset  int    `json:"startOffset"`
	EndOffset    int    `json:"endOffset"`
	Used         bool   `json:"used"`
}

CSSCoverageEntry represents a CSS rule usage entry.

type CSSCoverageResult

type CSSCoverageResult struct {
	Entries []CSSCoverageEntry `json:"entries"`
}

CSSCoverageResult contains CSS coverage data.

type CaretPositionResult

type CaretPositionResult struct {
	Start int `json:"start"`
	End   int `json:"end"`
}

CaretPositionResult contains the caret position in an input element.

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is a Chrome DevTools Protocol client.

func Connect

func Connect(ctx context.Context, host string, port int) (*Client, error)

Connect establishes a connection to Chrome at the given host and port.

func (*Client) AllPages added in v1.9.0

func (c *Client) AllPages(ctx context.Context) ([]TargetInfo, error)

AllPages returns all page targets including internal pages (DevTools, extensions).

func (*Client) AttachToTarget added in v1.9.0

func (c *Client) AttachToTarget(ctx context.Context, targetID string) (string, error)

AttachToTarget returns (or caches) a CDP session for the given target.

func (*Client) BlockURLs

func (c *Client) BlockURLs(ctx context.Context, targetID string, patterns []string) error

BlockURLs blocks network requests matching the specified URL patterns. Uses the Network.setBlockedURLs protocol method.

func (*Client) Call

func (c *Client) Call(ctx context.Context, method string, params interface{}) (json.RawMessage, error)

Call sends a protocol command and waits for the response.

func (*Client) CallSession

func (c *Client) CallSession(ctx context.Context, sessionID string, method string, params interface{}) (json.RawMessage, error)

CallSession sends a protocol command to a specific session and waits for the response.

func (*Client) CaptureConsole

func (c *Client) CaptureConsole(ctx context.Context, targetID string) (<-chan ConsoleMessage, func(), error)

CaptureConsole starts capturing console messages from a page. Returns a channel that receives ConsoleMessage and a stop function. The stop function MUST be called when done to release resources. The channel is closed when stop is called or when the client is closed.

func (*Client) CaptureExceptions

func (c *Client) CaptureExceptions(ctx context.Context, targetID string) (<-chan ExceptionInfo, func(), error)

CaptureExceptions starts capturing JavaScript exceptions from a page. Returns a channel that receives ExceptionInfo and a stop function. The stop function MUST be called when done to release resources. The channel is closed when stop is called or when the client is closed.

func (*Client) CaptureHAR

func (c *Client) CaptureHAR(ctx context.Context, targetID string, duration time.Duration) (*HARLog, error)

CaptureHAR captures network activity and returns it as a HAR log.

func (*Client) CaptureNetwork

func (c *Client) CaptureNetwork(ctx context.Context, targetID string) (<-chan NetworkEvent, func(), error)

CaptureNetwork starts capturing network events from a page. Returns a channel that receives NetworkEvent and a stop function. The stop function MUST be called when done to release resources. The channel is closed when stop is called or when the client is closed.

func (*Client) CaptureTrace

func (c *Client) CaptureTrace(ctx context.Context, targetID string, duration time.Duration) ([]byte, error)

CaptureTrace captures a Chrome performance trace for the given duration.

func (*Client) Check

func (c *Client) Check(ctx context.Context, targetID string, selector string) error

Check checks a checkbox or radio button.

func (*Client) Clear

func (c *Client) Clear(ctx context.Context, targetID string, selector string) error

Clear clears a text input field.

func (*Client) ClearCookies

func (c *Client) ClearCookies(ctx context.Context, targetID string) error

ClearCookies clears all cookies.

func (*Client) ClearLocalStorage

func (c *Client) ClearLocalStorage(ctx context.Context, targetID string) error

ClearLocalStorage clears all localStorage.

func (*Client) ClearSessionStorage

func (c *Client) ClearSessionStorage(ctx context.Context, targetID string) error

ClearSessionStorage clears all sessionStorage.

func (*Client) Click

func (c *Client) Click(ctx context.Context, targetID string, selector string) error

Click clicks on the first element matching a CSS selector.

func (*Client) ClickAt

func (c *Client) ClickAt(ctx context.Context, targetID string, x, y float64) error

ClickAt clicks at specific x, y coordinates.

func (*Client) Close

func (c *Client) Close() error

Close closes the connection to Chrome.

func (*Client) CloseTab

func (c *Client) CloseTab(ctx context.Context, targetID string) error

CloseTab closes a browser tab by its target ID.

func (*Client) CountElements

func (c *Client) CountElements(ctx context.Context, targetID string, selector string) (int, error)

CountElements returns the number of elements matching the selector.

func (*Client) DeleteCookie

func (c *Client) DeleteCookie(ctx context.Context, targetID string, name, domain string) error

DeleteCookie deletes a cookie by name and domain.

func (*Client) DisableIntercept

func (c *Client) DisableIntercept(ctx context.Context, targetID string) error

DisableIntercept disables request/response interception for the specified target.

func (*Client) DisableNetworkThrottling

func (c *Client) DisableNetworkThrottling(ctx context.Context, targetID string) error

DisableNetworkThrottling disables network throttling.

func (*Client) DispatchEvent

func (c *Client) DispatchEvent(ctx context.Context, targetID string, selector string, eventType string) (*DispatchEventResult, error)

DispatchEvent dispatches a custom event on an element.

func (*Client) DoubleClick

func (c *Client) DoubleClick(ctx context.Context, targetID string, selector string) error

DoubleClick double-clicks on an element specified by selector.

func (*Client) Drag

func (c *Client) Drag(ctx context.Context, targetID string, sourceSelector, destSelector string) error

Drag performs a drag from one element to another.

func (*Client) Emulate

func (c *Client) Emulate(ctx context.Context, targetID string, device DeviceInfo) error

Emulate sets device emulation for the specified target.

func (*Client) EmulateNetworkConditions

func (c *Client) EmulateNetworkConditions(ctx context.Context, targetID string, conditions NetworkConditions) error

EmulateNetworkConditions sets network throttling conditions.

func (*Client) EnableIntercept

func (c *Client) EnableIntercept(ctx context.Context, targetID string, config InterceptConfig) error

EnableIntercept enables request/response interception for the specified target.

func (*Client) Eval

func (c *Client) Eval(ctx context.Context, targetID string, expression string) (*EvalResult, error)

Eval evaluates a JavaScript expression in a target's page context.

func (*Client) EvalInFrame

func (c *Client) EvalInFrame(ctx context.Context, targetID string, frameID string, expression string) (*EvalResult, error)

EvalInFrame evaluates JavaScript in a specific frame.

func (*Client) EvalRich added in v1.9.0

func (c *Client) EvalRich(ctx context.Context, targetID string, expression string) (*RemoteObject, error)

EvalRich evaluates a JavaScript expression and returns the full RemoteObject with preview data, suitable for interactive object exploration.

func (*Client) ExecuteScriptFile

func (c *Client) ExecuteScriptFile(ctx context.Context, targetID string, content string) (*EvalResult, error)

ExecuteScriptFile reads and executes JavaScript from a file.

func (*Client) Exists

func (c *Client) Exists(ctx context.Context, targetID string, selector string) (bool, error)

Exists checks if an element matching the selector exists.

func (*Client) Fill

func (c *Client) Fill(ctx context.Context, targetID string, selector string, text string) error

Fill fills an input element with text.

func (*Client) FindText

func (c *Client) FindText(ctx context.Context, targetID string, text string) (*FindResult, error)

FindText searches for text on the page and returns occurrence count.

func (*Client) Focus

func (c *Client) Focus(ctx context.Context, targetID string, selector string) error

Focus focuses on an element specified by selector.

func (*Client) GetAccessibilityTree

func (c *Client) GetAccessibilityTree(ctx context.Context, targetID string) ([]AccessibilityNode, error)

GetAccessibilityTree returns the accessibility tree for the page.

func (*Client) GetAttribute

func (c *Client) GetAttribute(ctx context.Context, targetID string, selector string, name string) (string, error)

GetAttribute returns the value of an attribute for an element.

func (*Client) GetBoundingBox

func (c *Client) GetBoundingBox(ctx context.Context, targetID string, selector string) (*BoundingBox, error)

GetBoundingBox returns the bounding box of an element.

func (*Client) GetCSSCoverage

func (c *Client) GetCSSCoverage(ctx context.Context, targetID string) (*CSSCoverageResult, error)

GetCSSCoverage captures CSS rule usage data.

func (*Client) GetCaretPosition

func (c *Client) GetCaretPosition(ctx context.Context, targetID string, selector string) (*CaretPositionResult, error)

GetCaretPosition returns the caret (cursor) position in an input or textarea element.

func (*Client) GetComputedStyle

func (c *Client) GetComputedStyle(ctx context.Context, targetID string, selector string, property string) (*ComputedStyleResult, error)

GetComputedStyle returns the computed style value for a CSS property of an element.

func (*Client) GetComputedStyles

func (c *Client) GetComputedStyles(ctx context.Context, targetID string, selector string, properties []string) (map[string]string, error)

GetComputedStyles returns computed CSS styles for an element.

func (*Client) GetCookies

func (c *Client) GetCookies(ctx context.Context, targetID string) ([]Cookie, error)

GetCookies returns all cookies for the page.

func (*Client) GetCoverage

func (c *Client) GetCoverage(ctx context.Context, targetID string) (*CoverageResult, error)

GetCoverage returns JavaScript code coverage data.

func (*Client) GetDOMSnapshot

func (c *Client) GetDOMSnapshot(ctx context.Context, targetID string) (*DOMSnapshotResult, error)

GetDOMSnapshot captures a full serialized DOM tree.

func (*Client) GetElementLayout

func (c *Client) GetElementLayout(ctx context.Context, targetID string, selector string, depth int) (*ElementLayout, error)

GetElementLayout returns comprehensive layout info for an element and its children.

func (*Client) GetEventListeners

func (c *Client) GetEventListeners(ctx context.Context, targetID string, selector string) (*EventListenersResult, error)

GetEventListeners returns the event listeners attached to a DOM element.

func (*Client) GetForms

func (c *Client) GetForms(ctx context.Context, targetID string) ([]FormInfo, error)

GetForms returns information about all forms on the page.

func (*Client) GetFrames

func (c *Client) GetFrames(ctx context.Context, targetID string) ([]FrameInfo, error)

GetFrames returns all frames in the page (including nested iframes).

func (*Client) GetHTML

func (c *Client) GetHTML(ctx context.Context, targetID string, selector string) (string, error)

GetHTML returns the outer HTML of an element matching the selector.

func (*Client) GetImages

func (c *Client) GetImages(ctx context.Context, targetID string) ([]ImageInfo, error)

GetImages returns all images on the page.

func (*Client) GetLocalStorage

func (c *Client) GetLocalStorage(ctx context.Context, targetID string, key string) (string, error)

GetLocalStorage gets a value from localStorage.

func (*Client) GetPageInfo

func (c *Client) GetPageInfo(ctx context.Context, targetID string) (*PageInfo, error)

GetPageInfo returns combined information about the current page.

func (*Client) GetPageSource

func (c *Client) GetPageSource(ctx context.Context, targetID string) (string, error)

GetPageSource returns the full HTML source of the page.

func (*Client) GetPerformanceMetrics

func (c *Client) GetPerformanceMetrics(ctx context.Context, targetID string) (map[string]float64, error)

GetPerformanceMetrics returns performance metrics from the page.

func (*Client) GetProperties added in v1.9.0

func (c *Client) GetProperties(ctx context.Context, sessionID, objectID string, ownOnly bool) ([]PropertyDescriptor, error)

GetProperties fetches the properties of a remote object.

func (*Client) GetResponseBody

func (c *Client) GetResponseBody(ctx context.Context, targetID string, requestID string) (*ResponseBodyResult, error)

GetResponseBody retrieves the response body for a network request by its request ID.

func (*Client) GetScripts

func (c *Client) GetScripts(ctx context.Context, targetID string) (*ScriptsResult, error)

GetScripts returns all script elements on the page.

func (*Client) GetSelection

func (c *Client) GetSelection(ctx context.Context, targetID string) (*SelectionResult, error)

GetSelection returns the currently selected text on the page.

func (*Client) GetSessionStorage

func (c *Client) GetSessionStorage(ctx context.Context, targetID string, key string) (string, error)

GetSessionStorage gets a value from sessionStorage.

func (*Client) GetStylesheets

func (c *Client) GetStylesheets(ctx context.Context, targetID string) (*StylesheetsResult, error)

GetStylesheets returns all stylesheets on the page.

func (*Client) GetText

func (c *Client) GetText(ctx context.Context, targetID string, selector string) (string, error)

GetText returns the text content of an element.

func (*Client) GetTitle

func (c *Client) GetTitle(ctx context.Context, targetID string) (string, error)

GetTitle returns the page title.

func (*Client) GetURL

func (c *Client) GetURL(ctx context.Context, targetID string) (string, error)

GetURL returns the current page URL.

func (*Client) GetValue

func (c *Client) GetValue(ctx context.Context, targetID string, selector string) (string, error)

GetValue retrieves the value of an input, textarea, or select element.

func (*Client) GoBack

func (c *Client) GoBack(ctx context.Context, targetID string) error

GoBack navigates back in history.

func (*Client) GoForward

func (c *Client) GoForward(ctx context.Context, targetID string) error

GoForward navigates forward in history.

func (*Client) HandleDialog

func (c *Client) HandleDialog(ctx context.Context, targetID string, action string, promptText string) error

HandleDialog sets up automatic dialog handling. action can be "accept" or "dismiss". promptText is the text to enter for prompts (optional).

func (*Client) HideHighlight

func (c *Client) HideHighlight(ctx context.Context, targetID string) error

HideHighlight removes any element highlight.

func (*Client) Highlight

func (c *Client) Highlight(ctx context.Context, targetID string, selector string) error

Highlight adds a visual highlight to an element for debugging.

func (*Client) Hover

func (c *Client) Hover(ctx context.Context, targetID string, selector string) error

Hover moves the mouse over an element specified by selector.

func (*Client) IsVisible

func (c *Client) IsVisible(ctx context.Context, targetID string, selector string) (bool, error)

IsVisible checks if an element is visible.

func (*Client) MouseMove

func (c *Client) MouseMove(ctx context.Context, targetID string, x, y float64) (*MouseMoveResult, error)

MouseMove moves the mouse to the specified coordinates without clicking.

func (*Client) Navigate

func (c *Client) Navigate(ctx context.Context, targetID string, url string) (*NavigateResult, error)

Navigate navigates a target to the given URL and waits for load.

func (*Client) NavigateAndWait

func (c *Client) NavigateAndWait(ctx context.Context, targetID string, url string) (*NavigateResult, error)

NavigateAndWait navigates to a URL and waits for the page load event.

func (*Client) NewTab

func (c *Client) NewTab(ctx context.Context, url string) (string, error)

NewTab creates a new browser tab and returns its target ID.

func (*Client) NewTabAndWait added in v1.6.0

func (c *Client) NewTabAndWait(ctx context.Context, url string) (string, error)

NewTabAndWait creates a new tab, navigates to the URL, and waits for the page to load.

func (*Client) Pages

func (c *Client) Pages(ctx context.Context) ([]TargetInfo, error)

Pages returns only page targets (tabs).

func (*Client) Pinch

func (c *Client) Pinch(ctx context.Context, targetID string, selector string, direction string) (*PinchResult, error)

Pinch performs a two-finger pinch gesture on an element.

func (*Client) PressKey

func (c *Client) PressKey(ctx context.Context, targetID string, key string) error

PressKey presses a special key (Enter, Tab, Escape, etc.).

func (*Client) PressKeyWithModifiers

func (c *Client) PressKeyWithModifiers(ctx context.Context, targetID string, key string, mods KeyModifiers) error

PressKeyWithModifiers presses a key with modifier keys (Ctrl, Alt, Shift, Meta).

func (*Client) PrintToPDF

func (c *Client) PrintToPDF(ctx context.Context, targetID string, opts PDFOptions) ([]byte, error)

PrintToPDF generates a PDF of the page.

func (*Client) Query

func (c *Client) Query(ctx context.Context, targetID string, selector string) (*QueryResult, error)

Query finds the first DOM element matching a CSS selector.

func (*Client) QueryShadow

func (c *Client) QueryShadow(ctx context.Context, targetID string, hostSelector string, innerSelector string) (*QueryResult, error)

QueryShadow finds an element inside a shadow DOM. hostSelector is the CSS selector for the shadow host element. innerSelector is the CSS selector to query within the shadow root.

func (*Client) RawCall

func (c *Client) RawCall(ctx context.Context, method string, params json.RawMessage) (json.RawMessage, error)

RawCall sends a raw protocol command with JSON params.

func (*Client) RawCallSession

func (c *Client) RawCallSession(ctx context.Context, targetID string, method string, params json.RawMessage) (json.RawMessage, error)

RawCallSession sends a raw protocol command to a specific target/session.

func (*Client) ReadClipboard

func (c *Client) ReadClipboard(ctx context.Context, targetID string) (string, error)

ReadClipboard reads text from the clipboard.

func (*Client) RecordNavigations

func (c *Client) RecordNavigations(ctx context.Context, targetID string) (<-chan RecordedEvent, error)

RecordNavigations subscribes to Page.frameNavigated events and sends top-level navigation URLs to the returned channel. The channel is closed when the context is cancelled or the connection drops.

func (*Client) ReleaseObject added in v1.9.0

func (c *Client) ReleaseObject(ctx context.Context, sessionID, objectID string) error

ReleaseObject releases a single remote object.

func (*Client) ReleaseObjectGroup added in v1.9.0

func (c *Client) ReleaseObjectGroup(ctx context.Context, sessionID, group string) error

ReleaseObjectGroup releases all remote objects in a group.

func (*Client) Reload

func (c *Client) Reload(ctx context.Context, targetID string, ignoreCache bool) error

Reload reloads the page. If ignoreCache is true, the browser cache is bypassed.

func (*Client) RightClick

func (c *Client) RightClick(ctx context.Context, targetID string, selector string) error

RightClick right-clicks on an element specified by selector.

func (*Client) Screenshot

func (c *Client) Screenshot(ctx context.Context, targetID string, opts ScreenshotOptions) ([]byte, error)

Screenshot captures a screenshot of a target.

func (*Client) ScreenshotElement

func (c *Client) ScreenshotElement(ctx context.Context, targetID string, selector string, opts ScreenshotOptions) ([]byte, *BoundingBox, error)

ScreenshotElement captures a screenshot of a specific element.

func (*Client) ScreenshotFull added in v1.5.0

func (c *Client) ScreenshotFull(ctx context.Context, targetID string, opts ScreenshotOptions) ([]byte, error)

ScreenshotFull captures a screenshot of the entire page including content below the viewport.

func (*Client) ScrollBy

func (c *Client) ScrollBy(ctx context.Context, targetID string, x, y int) error

ScrollBy scrolls the page by x and y pixels.

func (*Client) ScrollIntoView

func (c *Client) ScrollIntoView(ctx context.Context, targetID string, selector string) error

ScrollIntoView scrolls an element into view.

func (*Client) ScrollToBottom

func (c *Client) ScrollToBottom(ctx context.Context, targetID string) error

ScrollToBottom scrolls to the bottom of the page.

func (*Client) ScrollToTop

func (c *Client) ScrollToTop(ctx context.Context, targetID string) error

ScrollToTop scrolls to the top of the page.

func (*Client) SelectOption

func (c *Client) SelectOption(ctx context.Context, targetID string, selector string, value string) error

SelectOption selects an option in a <select> element by value.

func (*Client) SetCookie

func (c *Client) SetCookie(ctx context.Context, targetID string, cookie Cookie) error

SetCookie sets a cookie for the page.

func (*Client) SetEmulatedMedia

func (c *Client) SetEmulatedMedia(ctx context.Context, targetID string, features MediaFeatures) error

SetEmulatedMedia sets emulated media features.

func (*Client) SetGeolocation

func (c *Client) SetGeolocation(ctx context.Context, targetID string, latitude, longitude, accuracy float64) error

SetGeolocation overrides the geolocation for the specified target.

func (*Client) SetLocalStorage

func (c *Client) SetLocalStorage(ctx context.Context, targetID string, key, value string) error

SetLocalStorage sets a value in localStorage.

func (*Client) SetOfflineMode

func (c *Client) SetOfflineMode(ctx context.Context, targetID string, offline bool) error

SetOfflineMode enables or disables offline mode for network emulation.

func (*Client) SetPermission

func (c *Client) SetPermission(ctx context.Context, targetID string, permission, state string) error

SetPermission sets the state of a permission for the page origin. permission: geolocation, notifications, midi, midi-sysex, push, camera, microphone, etc. state: granted, denied, prompt

func (*Client) SetSessionStorage

func (c *Client) SetSessionStorage(ctx context.Context, targetID string, key, value string) error

SetSessionStorage sets a value in sessionStorage.

func (*Client) SetUserAgent

func (c *Client) SetUserAgent(ctx context.Context, targetID string, userAgent string) error

SetUserAgent sets a custom user agent for the specified target.

func (*Client) SetValue

func (c *Client) SetValue(ctx context.Context, targetID string, selector string, value string) (*SetValueResult, error)

SetValue directly sets the value of an input/textarea element.

func (*Client) SetViewport

func (c *Client) SetViewport(ctx context.Context, targetID string, width, height int) error

SetViewport sets the browser viewport size.

func (*Client) StartBridge added in v1.8.0

func (c *Client) StartBridge(ctx context.Context, targetID string, script string) (*Bridge, error)

StartBridge establishes a bidirectional message channel with client-side JS. The provided script receives `send` (function) and `messages` (async iterator) in scope. Events from the bridge (ready, message, error, closed) are delivered on the returned Bridge.Events channel.

func (*Client) Swipe

func (c *Client) Swipe(ctx context.Context, targetID string, selector string, direction string) (*SwipeResult, error)

Swipe performs a touch swipe gesture on an element.

func (*Client) TakeHeapSnapshot

func (c *Client) TakeHeapSnapshot(ctx context.Context, targetID string) ([]byte, error)

TakeHeapSnapshot captures a V8 heap snapshot and writes it to a file.

func (*Client) Tap

func (c *Client) Tap(ctx context.Context, targetID string, selector string) error

Tap performs a touch tap on an element (like a finger tap on mobile).

func (*Client) Targets

func (c *Client) Targets(ctx context.Context) ([]TargetInfo, error)

Targets returns all browser targets (pages, workers, etc.).

func (*Client) TripleClick

func (c *Client) TripleClick(ctx context.Context, targetID string, selector string) error

TripleClick triple-clicks on an element specified by selector. This is typically used to select an entire paragraph.

func (*Client) Type

func (c *Client) Type(ctx context.Context, targetID string, text string) error

Type sends individual key events for each character in the text. This is useful for inputs that need realistic typing (autocomplete, etc.).

func (*Client) UnblockURLs

func (c *Client) UnblockURLs(ctx context.Context, targetID string) error

UnblockURLs clears all URL blocking patterns.

func (*Client) Uncheck

func (c *Client) Uncheck(ctx context.Context, targetID string, selector string) error

Uncheck unchecks a checkbox.

func (*Client) UploadFile

func (c *Client) UploadFile(ctx context.Context, targetID string, selector string, files []string) error

UploadFile sets files for a file input element.

func (*Client) Version

func (c *Client) Version(ctx context.Context) (*VersionInfo, error)

Version returns the browser version information.

func (*Client) WaitFor

func (c *Client) WaitFor(ctx context.Context, targetID string, selector string, timeout time.Duration) error

WaitFor waits for an element matching the selector to appear.

func (*Client) WaitForFunction

func (c *Client) WaitForFunction(ctx context.Context, targetID string, expression string, timeout time.Duration) error

WaitForFunction waits until a JavaScript expression evaluates to a truthy value.

func (*Client) WaitForGone

func (c *Client) WaitForGone(ctx context.Context, targetID string, selector string, timeout time.Duration) error

WaitForGone waits for an element to be removed from the DOM.

func (*Client) WaitForLoad

func (c *Client) WaitForLoad(ctx context.Context, targetID string) error

WaitForLoad waits for the page load event.

func (*Client) WaitForNavigation

func (c *Client) WaitForNavigation(ctx context.Context, targetID string, timeout time.Duration) error

WaitForNavigation waits for a navigation to complete.

func (*Client) WaitForNetworkIdle

func (c *Client) WaitForNetworkIdle(ctx context.Context, targetID string, idleTime time.Duration) error

WaitForNetworkIdle waits until there are no pending network requests for the specified duration.

func (*Client) WaitForRequest

func (c *Client) WaitForRequest(ctx context.Context, targetID string, pattern string, timeout time.Duration) (*WaitRequestResult, error)

WaitForRequest waits for a network request with a URL containing the pattern.

func (*Client) WaitForResponse

func (c *Client) WaitForResponse(ctx context.Context, targetID string, pattern string, timeout time.Duration) (*WaitResponseResult, error)

WaitForResponse waits for a network response with a URL containing the pattern.

func (*Client) WaitForText

func (c *Client) WaitForText(ctx context.Context, targetID string, text string, timeout time.Duration) error

WaitForText waits for text to appear on the page.

func (*Client) WaitForURL

func (c *Client) WaitForURL(ctx context.Context, targetID string, pattern string, timeout time.Duration) (string, error)

WaitForURL waits for the page URL to contain the given pattern.

func (*Client) WebSocketURL

func (c *Client) WebSocketURL() string

WebSocketURL returns the WebSocket URL used for this connection.

func (*Client) WriteClipboard

func (c *Client) WriteClipboard(ctx context.Context, targetID string, text string) error

WriteClipboard writes text to the clipboard.

type ComputedStyleResult

type ComputedStyleResult struct {
	Property string `json:"property"`
	Value    string `json:"value"`
}

ComputedStyleResult contains the computed style value for an element.

type ConsoleMessage

type ConsoleMessage struct {
	Type string         `json:"type"` // "log", "warn", "error", "info", "debug"
	Text string         `json:"text"`
	Args []RemoteObject `json:"args,omitempty"` // rich argument data when available
}

ConsoleMessage represents a console message from the browser.

type Cookie struct {
	Name     string  `json:"name"`
	Value    string  `json:"value"`
	Domain   string  `json:"domain,omitempty"`
	Path     string  `json:"path,omitempty"`
	Expires  float64 `json:"expires,omitempty"`
	HTTPOnly bool    `json:"httpOnly,omitempty"`
	Secure   bool    `json:"secure,omitempty"`
	SameSite string  `json:"sameSite,omitempty"`
}

Cookie represents a browser cookie.

type CoverageRange

type CoverageRange struct {
	StartOffset int `json:"startOffset"`
	EndOffset   int `json:"endOffset"`
	Count       int `json:"count"`
}

CoverageRange represents a covered range in the script.

type CoverageResult

type CoverageResult struct {
	Scripts []ScriptCoverage `json:"scripts"`
}

CoverageResult represents JavaScript code coverage data.

type DOMSnapshotResult

type DOMSnapshotResult struct {
	Documents []json.RawMessage `json:"documents"`
	Strings   []string          `json:"strings"`
}

DOMSnapshotResult contains a DOM snapshot.

type DeviceInfo

type DeviceInfo struct {
	Name              string  `json:"name"`
	Width             int     `json:"width"`
	Height            int     `json:"height"`
	DeviceScaleFactor float64 `json:"deviceScaleFactor"`
	Mobile            bool    `json:"mobile"`
	UserAgent         string  `json:"userAgent"`
}

DeviceInfo contains device emulation parameters.

type DispatchEventResult

type DispatchEventResult struct {
	Dispatched bool   `json:"dispatched"`
	EventType  string `json:"eventType"`
	Selector   string `json:"selector"`
}

DispatchEventResult contains the result of dispatching a custom event.

type ElementLayout

type ElementLayout struct {
	Selector string            `json:"selector"`
	TagName  string            `json:"tagName"`
	Bounds   *BoundingBox      `json:"bounds"`
	Styles   map[string]string `json:"styles,omitempty"`
	Children []ElementLayout   `json:"children,omitempty"`
}

ElementLayout contains comprehensive layout information for an element.

type EntryPreview added in v1.9.0

type EntryPreview struct {
	Key   *ObjectPreview `json:"key,omitempty"`
	Value ObjectPreview  `json:"value"`
}

EntryPreview is a Map/Set entry in a preview.

type EvalResult

type EvalResult struct {
	Value interface{} `json:"value"`
	Type  string      `json:"type,omitempty"`
}

EvalResult contains the result of evaluating a JavaScript expression.

type EventListenerInfo

type EventListenerInfo struct {
	Type         string `json:"type"`
	UseCapture   bool   `json:"useCapture"`
	Passive      bool   `json:"passive"`
	Once         bool   `json:"once"`
	ScriptID     string `json:"scriptId,omitempty"`
	LineNumber   int    `json:"lineNumber"`
	ColumnNumber int    `json:"columnNumber"`
}

EventListenerInfo contains information about an event listener.

type EventListenersResult

type EventListenersResult struct {
	Listeners []EventListenerInfo `json:"listeners"`
}

EventListenersResult contains the list of event listeners on an element.

type ExceptionInfo

type ExceptionInfo struct {
	Text         string `json:"text"`
	LineNumber   int    `json:"lineNumber,omitempty"`
	ColumnNumber int    `json:"columnNumber,omitempty"`
	URL          string `json:"url,omitempty"`
}

ExceptionInfo represents a JavaScript exception.

type FindResult

type FindResult struct {
	Text  string `json:"text"`
	Count int    `json:"count"`
	Found bool   `json:"found"`
}

FindResult represents the result of finding text on the page.

type FormInfo

type FormInfo struct {
	ID     string      `json:"id,omitempty"`
	Name   string      `json:"name,omitempty"`
	Action string      `json:"action,omitempty"`
	Method string      `json:"method,omitempty"`
	Inputs []InputInfo `json:"inputs"`
}

FormInfo contains information about a form on the page.

type FrameInfo

type FrameInfo struct {
	ID       string `json:"id"`
	ParentID string `json:"parentId,omitempty"`
	Name     string `json:"name,omitempty"`
	URL      string `json:"url"`
}

FrameInfo contains information about a frame.

type HARContent

type HARContent struct {
	Size     int    `json:"size"`
	MimeType string `json:"mimeType"`
}

HARContent represents the response body content.

type HARCreator

type HARCreator struct {
	Name    string `json:"name"`
	Version string `json:"version"`
}

HARCreator represents the creator of the HAR file.

type HAREntry

type HAREntry struct {
	StartedDateTime string      `json:"startedDateTime"`
	Time            float64     `json:"time"`
	Request         HARRequest  `json:"request"`
	Response        HARResponse `json:"response"`
	Cache           struct{}    `json:"cache"`
	Timings         HARTimings  `json:"timings"`
}

HAREntry represents a single HTTP transaction.

type HARHeader

type HARHeader struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

HARHeader represents an HTTP header.

type HARLog

type HARLog struct {
	Log struct {
		Version string     `json:"version"`
		Creator HARCreator `json:"creator"`
		Entries []HAREntry `json:"entries"`
	} `json:"log"`
}

HARLog represents an HTTP Archive log.

type HARQuery

type HARQuery struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

HARQuery represents a query string parameter.

type HARRequest

type HARRequest struct {
	Method      string      `json:"method"`
	URL         string      `json:"url"`
	HTTPVersion string      `json:"httpVersion"`
	Headers     []HARHeader `json:"headers"`
	QueryString []HARQuery  `json:"queryString"`
	HeadersSize int         `json:"headersSize"`
	BodySize    int         `json:"bodySize"`
}

HARRequest represents an HTTP request.

type HARResponse

type HARResponse struct {
	Status      int         `json:"status"`
	StatusText  string      `json:"statusText"`
	HTTPVersion string      `json:"httpVersion"`
	Headers     []HARHeader `json:"headers"`
	Content     HARContent  `json:"content"`
	RedirectURL string      `json:"redirectURL"`
	HeadersSize int         `json:"headersSize"`
	BodySize    int         `json:"bodySize"`
}

HARResponse represents an HTTP response.

type HARTimings

type HARTimings struct {
	Send    float64 `json:"send"`
	Wait    float64 `json:"wait"`
	Receive float64 `json:"receive"`
}

HARTimings represents the timing information.

type HeapSnapshotResult

type HeapSnapshotResult struct {
	File string `json:"file"`
	Size int    `json:"size"`
}

HeapSnapshotResult contains metadata about a captured heap snapshot.

type ImageInfo

type ImageInfo struct {
	Src     string `json:"src"`
	Alt     string `json:"alt,omitempty"`
	Width   int    `json:"width,omitempty"`
	Height  int    `json:"height,omitempty"`
	Loading string `json:"loading,omitempty"`
}

ImageInfo contains information about an image element.

type InputInfo

type InputInfo struct {
	Name        string `json:"name,omitempty"`
	Type        string `json:"type"`
	ID          string `json:"id,omitempty"`
	Value       string `json:"value,omitempty"`
	Placeholder string `json:"placeholder,omitempty"`
	Required    bool   `json:"required,omitempty"`
}

InputInfo contains information about a form input.

type InterceptConfig

type InterceptConfig struct {
	URLPattern        string            // URL pattern to match (e.g., "*", "*.js", "https://example.com/*")
	InterceptResponse bool              // If true, intercept responses; if false, intercept requests
	Replacements      map[string]string // Text replacements to apply (old -> new)
	ResponseBody      string            // Override response body entirely (if set, Replacements ignored)
	StatusCode        int               // Override status code (0 = use original)
	Headers           map[string]string // Override/add headers
}

InterceptConfig configures request/response interception.

type KeyModifiers

type KeyModifiers struct {
	Ctrl  bool
	Alt   bool
	Shift bool
	Meta  bool
}

KeyModifiers represents keyboard modifier keys.

type MediaFeatures

type MediaFeatures struct {
	ColorScheme   string // "light", "dark", or "" for no preference
	ReducedMotion string // "reduce", "no-preference", or "" for no preference
	ForcedColors  string // "active", "none", or "" for no preference
}

MediaFeatures represents CSS media features to emulate.

type MouseMoveResult

type MouseMoveResult struct {
	X float64 `json:"x"`
	Y float64 `json:"y"`
}

MouseMoveResult represents the result of moving the mouse.

type NavigateResult struct {
	FrameID   string `json:"frameId"`
	LoaderID  string `json:"loaderId,omitempty"`
	URL       string `json:"url"`
	ErrorText string `json:"errorText,omitempty"`
}

NavigateResult contains the result of a navigation.

type NetworkConditions

type NetworkConditions struct {
	Offline            bool    `json:"offline"`
	Latency            float64 `json:"latency"`            // Milliseconds
	DownloadThroughput float64 `json:"downloadThroughput"` // Bytes per second (-1 = disabled)
	UploadThroughput   float64 `json:"uploadThroughput"`   // Bytes per second (-1 = disabled)
}

NetworkConditions represents network throttling settings.

type NetworkEvent

type NetworkEvent struct {
	Type      string `json:"type"`      // "request" or "response"
	RequestID string `json:"requestId"` // unique identifier for matching request/response
	URL       string `json:"url"`
	Method    string `json:"method,omitempty"`   // HTTP method (requests only)
	Status    int    `json:"status,omitempty"`   // HTTP status code (responses only)
	MimeType  string `json:"mimeType,omitempty"` // MIME type (responses only)
}

NetworkEvent represents a network request or response event.

type ObjectPreview added in v1.9.0

type ObjectPreview struct {
	Type        string            `json:"type"`
	Subtype     string            `json:"subtype,omitempty"`
	Description string            `json:"description,omitempty"`
	Properties  []PropertyPreview `json:"properties"`
	Overflow    bool              `json:"overflow"`          // true if truncated
	Entries     []EntryPreview    `json:"entries,omitempty"` // for Map/Set
}

ObjectPreview is a snapshot of an object's properties taken at log time.

type PDFOptions

type PDFOptions struct {
	Landscape         bool    `json:"landscape,omitempty"`
	PrintBackground   bool    `json:"printBackground,omitempty"`
	Scale             float64 `json:"scale,omitempty"`
	PaperWidth        float64 `json:"paperWidth,omitempty"`  // inches
	PaperHeight       float64 `json:"paperHeight,omitempty"` // inches
	MarginTop         float64 `json:"marginTop,omitempty"`   // inches
	MarginBottom      float64 `json:"marginBottom,omitempty"`
	MarginLeft        float64 `json:"marginLeft,omitempty"`
	MarginRight       float64 `json:"marginRight,omitempty"`
	PageRanges        string  `json:"pageRanges,omitempty"` // e.g. "1-5, 8"
	PreferCSSPageSize bool    `json:"preferCSSPageSize,omitempty"`
}

PDFOptions configures PDF generation.

type PageInfo

type PageInfo struct {
	Title        string `json:"title"`
	URL          string `json:"url"`
	ReadyState   string `json:"readyState"`
	CharacterSet string `json:"characterSet"`
	ContentType  string `json:"contentType"`
}

PageInfo represents combined information about the current page.

type PinchResult

type PinchResult struct {
	Pinched   bool   `json:"pinched"`
	Direction string `json:"direction"`
	Selector  string `json:"selector"`
}

PinchResult contains the result of a pinch gesture.

type PropertyDescriptor added in v1.9.0

type PropertyDescriptor struct {
	Name         string        `json:"name"`
	Value        *RemoteObject `json:"value,omitempty"`
	Writable     bool          `json:"writable,omitempty"`
	Configurable bool          `json:"configurable,omitempty"`
	Enumerable   bool          `json:"enumerable,omitempty"`
	IsOwn        bool          `json:"isOwn,omitempty"`
}

PropertyDescriptor describes a property returned by Runtime.getProperties.

type PropertyPreview added in v1.9.0

type PropertyPreview struct {
	Name         string         `json:"name"`
	Type         string         `json:"type"`
	Value        string         `json:"value,omitempty"`
	Subtype      string         `json:"subtype,omitempty"`
	ValuePreview *ObjectPreview `json:"valuePreview,omitempty"` // nested preview for object values
}

PropertyPreview is a single property in an object preview.

type ProtocolError

type ProtocolError struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
}

ProtocolError represents an error returned by the Chrome DevTools Protocol.

func (*ProtocolError) Error

func (e *ProtocolError) Error() string

func (*ProtocolError) Unwrap

func (e *ProtocolError) Unwrap() error

type QueryResult

type QueryResult struct {
	NodeID     int               `json:"nodeId"`
	TagName    string            `json:"tagName,omitempty"`
	Attributes map[string]string `json:"attributes,omitempty"`
}

QueryResult contains the result of querying for a DOM element.

type RecordedEvent

type RecordedEvent struct {
	Type string `json:"type"` // "navigate", "click", etc.
	URL  string `json:"url,omitempty"`
}

RecordedEvent represents a recorded browser event.

type RemoteObject added in v1.9.0

type RemoteObject struct {
	Type                string         `json:"type"`                          // "object", "string", "number", "boolean", "undefined", "function", "symbol", "bigint"
	Subtype             string         `json:"subtype,omitempty"`             // "array", "null", "date", "regexp", "map", "set", "promise", "error", etc.
	ClassName           string         `json:"className,omitempty"`           // constructor name
	Description         string         `json:"description,omitempty"`         // string representation
	ObjectID            string         `json:"objectId,omitempty"`            // handle for getProperties (empty for primitives)
	Value               interface{}    `json:"value,omitempty"`               // primitive value
	UnserializableValue string         `json:"unserializableValue,omitempty"` // Infinity, -0, NaN, -Infinity, bigint literals
	Preview             *ObjectPreview `json:"preview,omitempty"`             // shallow property snapshot
}

RemoteObject represents a JavaScript value with optional remote reference.

type ResponseBodyResult

type ResponseBodyResult struct {
	Body          string `json:"body"`
	Base64Encoded bool   `json:"base64Encoded"`
}

ResponseBodyResult contains the response body for a network request.

type ScreenshotOptions

type ScreenshotOptions struct {
	Format  string // "png", "jpeg", "webp"
	Quality int    // 0-100, only for jpeg/webp
}

ScreenshotOptions configures screenshot capture.

type ScreenshotResult

type ScreenshotResult struct {
	Format string `json:"format"`
	Size   int    `json:"size"`
}

ScreenshotResult contains metadata about a captured screenshot.

type ScriptCoverage

type ScriptCoverage struct {
	ScriptID string          `json:"scriptId"`
	URL      string          `json:"url"`
	Ranges   []CoverageRange `json:"ranges"`
}

ScriptCoverage represents coverage for a single script.

type ScriptInfo

type ScriptInfo struct {
	Src    string `json:"src"`
	Type   string `json:"type"`
	Async  bool   `json:"async"`
	Defer  bool   `json:"defer"`
	Inline bool   `json:"inline"`
}

ScriptInfo represents information about a script element.

type ScriptsResult

type ScriptsResult struct {
	Scripts []ScriptInfo `json:"scripts"`
}

ScriptsResult represents all scripts on the page.

type SelectionResult

type SelectionResult struct {
	Text string `json:"text"`
}

SelectionResult contains the currently selected text on the page.

type SetValueResult

type SetValueResult struct {
	Selector string `json:"selector"`
	Value    string `json:"value"`
}

SetValueResult represents the result of setting an input value.

type StylesheetInfo

type StylesheetInfo struct {
	StyleSheetID string `json:"styleSheetId"`
	SourceURL    string `json:"sourceURL"`
	Title        string `json:"title"`
	Disabled     bool   `json:"disabled"`
	IsInline     bool   `json:"isInline"`
	Length       int    `json:"length"`
}

StylesheetInfo represents information about a stylesheet.

type StylesheetsResult

type StylesheetsResult struct {
	Stylesheets []StylesheetInfo `json:"stylesheets"`
}

StylesheetsResult represents all stylesheets on the page.

type SwipeResult

type SwipeResult struct {
	Swiped    bool   `json:"swiped"`
	Direction string `json:"direction"`
	Selector  string `json:"selector"`
}

SwipeResult contains the result of a swipe gesture.

type TargetInfo

type TargetInfo struct {
	ID    string `json:"id"`
	Type  string `json:"type"`
	Title string `json:"title"`
	URL   string `json:"url"`
}

TargetInfo contains information about a browser target (tab/page).

type TraceResult

type TraceResult struct {
	File string `json:"file"`
	Size int    `json:"size"`
}

TraceResult contains metadata about a captured trace.

type VersionInfo

type VersionInfo struct {
	Browser         string `json:"browser"`
	ProtocolVersion string `json:"protocol"`
	UserAgent       string `json:"userAgent,omitempty"`
	V8Version       string `json:"v8,omitempty"`
}

VersionInfo contains browser version information.

type WaitRequestResult

type WaitRequestResult struct {
	Found     bool   `json:"found"`
	URL       string `json:"url"`
	Method    string `json:"method"`
	RequestID string `json:"requestId"`
}

WaitRequestResult contains the result of waiting for a network request.

type WaitResponseResult

type WaitResponseResult struct {
	Found     bool   `json:"found"`
	URL       string `json:"url"`
	Status    int    `json:"status"`
	MimeType  string `json:"mimeType,omitempty"`
	RequestID string `json:"requestId"`
}

WaitResponseResult contains the result of waiting for a network response.

Directories

Path Synopsis
Package launcher provides Chrome browser discovery, launching, and lifecycle management.
Package launcher provides Chrome browser discovery, launching, and lifecycle management.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL