webdriver

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MimeText = core.MimeText
	MimeHTML = core.MimeHTML
	MimeJSON = core.MimeJSON
	MimePNG  = core.MimePNG
)

Variables

View Source
var (
	ErrDriverNil         = core.ErrDriverNil
	ErrBrowserNil        = core.ErrBrowserNil
	ErrPageNil           = core.ErrPageNil
	ErrElementNotFound   = core.ErrElementNotFound
	ErrElementNotVisible = core.ErrElementNotVisible
	ErrElementUnstable   = core.ErrElementUnstable
	ErrElementDisabled   = core.ErrElementDisabled
)

Functions

This section is empty.

Types

type Chain

type Chain = core.Chain

Chain provides fluent scenario building.

type DiagnosticsConfig

type DiagnosticsConfig = core.DiagnosticsConfig

DiagnosticsConfig controls artifacts attached on step failure.

type Driver

type Driver = core.Driver

Driver is a high-level web driver DSL on top of Rod.

func Launch

func Launch(cfg LaunchConfig, opts ...Option) (*Driver, error)

Launch starts browser via Rod launcher and returns ready driver.

func New

func New(browser *rod.Browser, opts ...Option) *Driver

New creates a driver on top of existing browser.

type Element

type Element = core.Element

Element is a named UI element description.

type LaunchConfig

type LaunchConfig = core.LaunchConfig

LaunchConfig controls browser launcher options.

func DefaultLaunchConfig

func DefaultLaunchConfig() LaunchConfig

DefaultLaunchConfig returns baseline browser launch settings for CI usage.

type NoopReporter

type NoopReporter = core.NoopReporter

NoopReporter runs steps without additional reporting.

type Option

type Option = core.Option

Option configures Driver defaults.

func WithDefaultElementTimeout

func WithDefaultElementTimeout(timeout time.Duration) Option

WithDefaultElementTimeout overrides per-element search timeout.

func WithDefaultInterval

func WithDefaultInterval(interval time.Duration) Option

WithDefaultInterval overrides retry polling interval.

func WithDefaultReloadEachPoll

func WithDefaultReloadEachPoll(enabled bool) Option

WithDefaultReloadEachPoll enables page reload on every retry poll by default.

func WithDefaultTimeout

func WithDefaultTimeout(timeout time.Duration) Option

WithDefaultTimeout overrides default operation timeout.

func WithDefaultWaitStable

func WithDefaultWaitStable(waitStable time.Duration) Option

WithDefaultWaitStable overrides default wait-stable delay after element lookup.

func WithDiagnosticsEnabled

func WithDiagnosticsEnabled(enabled bool) Option

WithDiagnosticsEnabled toggles automatic failure artifact collection.

func WithFailureHTML

func WithFailureHTML(enabled bool) Option

WithFailureHTML toggles page HTML attachment on step failure.

func WithFailureScreenshot

func WithFailureScreenshot(enabled bool) Option

WithFailureScreenshot toggles screenshot attachment on step failure.

func WithFailureSummary

func WithFailureSummary(enabled bool) Option

WithFailureSummary toggles text summary attachment on step failure.

func WithFailureURL

func WithFailureURL(enabled bool) Option

WithFailureURL toggles current URL attachment on step failure.

func WithReporter

func WithReporter(reporter Reporter) Option

WithReporter sets reporter used by the driver.

type Reporter

type Reporter = core.Reporter

Reporter is a pluggable step/attachments sink.

type Selector

type Selector = core.Selector

Selector describes supported strategies for finding an element.

type WaitConfig

type WaitConfig = core.WaitConfig

WaitConfig controls retry and wait behavior.

type WaitOption

type WaitOption = core.WaitOption

WaitOption overrides wait settings for a single call.

func WithElementTimeout

func WithElementTimeout(timeout time.Duration) WaitOption

WithElementTimeout overrides element lookup timeout for a single operation call.

func WithInterval

func WithInterval(interval time.Duration) WaitOption

WithInterval overrides retry interval for a single operation call.

func WithReloadEachPoll

func WithReloadEachPoll(enabled bool) WaitOption

WithReloadEachPoll enables page reload on each retry poll for a single call.

func WithTimeout

func WithTimeout(timeout time.Duration) WaitOption

WithTimeout overrides timeout for a single operation call.

func WithWaitStable

func WithWaitStable(waitStable time.Duration) WaitOption

WithWaitStable overrides stable wait delay for a single operation call.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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