Versions in this module Expand all Collapse all v0 v0.2.1 Aug 4, 2026 Changes in this version + const DefaultPort + const UserDataDirDefault + var ErrBrowserClosed = errors.New("browser is closed") + var ErrChromeNotFound = errors.New("chrome not found") + var ErrNoPageTarget = errors.New("no page target found") + var ErrPortInUse = errors.New("port is already in use") + var ErrStartTimeout = errors.New("browser start timeout") + var ErrSystemProfileInUse = errors.New("system Chrome profile is already in use by another browser instance") + func FindChrome() (string, error) + type Browser struct + func Start(opts LaunchOptions) (*Browser, error) + func StartWithBinary(binPath string, opts LaunchOptions) (*Browser, error) + func (b *Browser) Close() error + func (b *Browser) PID() int + func (b *Browser) PageTarget(ctx context.Context) (*Target, error) + func (b *Browser) Port() int + func (b *Browser) Targets(ctx context.Context) ([]Target, error) + func (b *Browser) Version(ctx context.Context) (*VersionInfo, error) + func (b *Browser) WebSocketURL(ctx context.Context) (string, error) + type LaunchOptions struct + Headless bool + Port int + UserDataDir string + type Target struct + Description string + ID string + Title string + Type string + URL string + WebSocketURL string + func FetchTargets(ctx context.Context, host string, port int) ([]Target, error) + func FindPageTarget(targets []Target) *Target + type VersionInfo struct + Browser string + ProtocolVer string + UserAgent string + V8Version string + WebKitVersion string + WebSocketURL string + func FetchVersion(ctx context.Context, host string, port int) (*VersionInfo, error)