Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChromeInfo ¶
type ChromeInfo struct {
// Path is the full path to the Chrome executable.
Path string
// UseMacOSOpen indicates whether to use the macOS `open -na` pattern.
UseMacOSOpen bool
// AppName is the application name for macOS `open -na` (e.g., "Google Chrome").
AppName string
}
ChromeInfo holds information about a detected Chrome/Chromium installation.
func DetectChrome ¶
func DetectChrome() (*ChromeInfo, error)
DetectChrome finds a Chrome or Chromium installation on the system. Returns ErrChromeNotFound if no installation is found.
type CommandRunner ¶
type CommandRunner interface {
// Run starts the command and does not wait for it to complete.
Run(name string, args ...string) error
}
CommandRunner executes external commands. Abstracted for testing.
type Option ¶
type Option func(*config)
Option configures browser opening behavior.
func WithCommandRunner ¶
func WithCommandRunner(runner CommandRunner) Option
WithCommandRunner sets a custom command runner (for testing).
func WithIsolatedSession ¶
WithIsolatedSession enables isolated browser sessions using the given directory as Chrome's user data directory. The caller is responsible for creating the directory and choosing an appropriate path (e.g., based on realm, identity, or any other session key).