allwright

package module
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Ping

func Ping(ctx context.Context) (string, error)

func Shutdown

func Shutdown() error

Types

type Browser

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

func LaunchChrome

func LaunchChrome(ctx context.Context, options LaunchOptions) (*Browser, error)

func (*Browser) BrowserName

func (b *Browser) BrowserName() string

func (*Browser) CdpWebSocketURL

func (b *Browser) CdpWebSocketURL() string

func (*Browser) Close

func (b *Browser) Close(ctx context.Context) error

func (*Browser) InitialTab

func (b *Browser) InitialTab() *Tab

func (*Browser) LaunchNote

func (b *Browser) LaunchNote() string

func (*Browser) NewTab

func (b *Browser) NewTab(ctx context.Context, options ...CommandOptions) (*Tab, error)

func (*Browser) Ping

func (b *Browser) Ping(ctx context.Context, message string) (string, error)

func (*Browser) SessionID

func (b *Browser) SessionID() string

func (*Browser) UserDataDir

func (b *Browser) UserDataDir() string

type ClickResult

type ClickResult struct {
	Selector      string
	Note          string
	BidiSessionID string
}

type CommandOptions added in v0.0.3

type CommandOptions struct {
	Timeout time.Duration
}

type CountResult added in v0.0.3

type CountResult struct {
	Selector string
	Count    uint32
	Note     string
}

type ElementResult added in v0.0.5

type ElementResult struct {
	Selector string
	Note     string
}

type FillResult added in v0.0.5

type FillResult struct {
	Selector string
	Value    string
	Note     string
}

type HighlightOptions added in v0.0.3

type HighlightOptions struct {
	Timeout  time.Duration
	Duration time.Duration
}

type HighlightResult added in v0.0.3

type HighlightResult struct {
	Selector string
	Count    uint32
	Note     string
}

type LaunchOptions

type LaunchOptions struct {
	ChromeBinary string
	Timeout      time.Duration
}
type NavigateResult struct {
	URL             string
	Note            string
	BidiSessionID   string
	MapperTargetID  string
	MapperSessionID string
	PackageVersion  string
}

type PressOptions added in v0.0.5

type PressOptions struct {
	Timeout time.Duration
	Text    string
}

type PressResult added in v0.0.5

type PressResult struct {
	Selector string
	Key      string
	Note     string
}

type Tab

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

func (*Tab) Click

func (t *Tab) Click(ctx context.Context, cssSelector string, options ...CommandOptions) (*ClickResult, error)

func (*Tab) Close

func (t *Tab) Close(ctx context.Context) error

func (*Tab) Count added in v0.0.3

func (t *Tab) Count(ctx context.Context, cssSelector string, options ...CommandOptions) (*CountResult, error)

func (*Tab) Fill added in v0.0.5

func (t *Tab) Fill(ctx context.Context, cssSelector string, value string, options ...CommandOptions) (*FillResult, error)

func (*Tab) Focus added in v0.0.5

func (t *Tab) Focus(ctx context.Context, cssSelector string, options ...CommandOptions) (*ElementResult, error)

func (*Tab) Highlight added in v0.0.3

func (t *Tab) Highlight(ctx context.Context, cssSelector string, options ...HighlightOptions) (*HighlightResult, error)

func (*Tab) Hover added in v0.0.5

func (t *Tab) Hover(ctx context.Context, cssSelector string, options ...CommandOptions) (*ElementResult, error)

func (*Tab) InnerText added in v0.0.5

func (t *Tab) InnerText(ctx context.Context, cssSelector string, options ...CommandOptions) (*TextResult, error)

func (*Tab) Navigate

func (t *Tab) Navigate(ctx context.Context, url string, options ...CommandOptions) (*NavigateResult, error)

func (*Tab) Ping

func (t *Tab) Ping(ctx context.Context, message string) (string, error)

func (*Tab) Press added in v0.0.5

func (t *Tab) Press(ctx context.Context, cssSelector string, key string, options ...PressOptions) (*PressResult, error)

func (*Tab) SessionID

func (t *Tab) SessionID() string

func (*Tab) TextContent added in v0.0.5

func (t *Tab) TextContent(ctx context.Context, cssSelector string, options ...CommandOptions) (*TextResult, error)

func (*Tab) WaitForSelector added in v0.0.5

func (t *Tab) WaitForSelector(ctx context.Context, cssSelector string, options ...WaitForSelectorOptions) (*WaitForSelectorResult, error)

type TextResult added in v0.0.5

type TextResult struct {
	Selector string
	Text     string
	Note     string
}

type WaitForSelectorOptions added in v0.0.5

type WaitForSelectorOptions struct {
	Timeout time.Duration
	Visible *bool
}

type WaitForSelectorResult added in v0.0.5

type WaitForSelectorResult struct {
	Selector string
	Visible  bool
	Note     string
}

Directories

Path Synopsis
examples
playground command
gen

Jump to

Keyboard shortcuts

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