browser

package
v2.0.0-...-a3b022e Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Browser

type Browser struct {
	TaskCtx context.Context

	TempDir string
	// contains filtered or unexported fields
}

func NewBrowser

func NewBrowser(execOptions map[string]interface{}, log zLogger.ZLogger, browserLogFunc func(string, ...interface{})) (*Browser, error)

func (*Browser) Close

func (browser *Browser) Close()

func (*Browser) Init

func (browser *Browser) Init(execOptions map[string]interface{}) error

func (*Browser) IsRunning

func (browser *Browser) IsRunning() bool

checks whether browser is running. if not, clean up

func (*Browser) MouseClick

func (browser *Browser) MouseClick(waitVisible string, x, y int64, element string, timeout time.Duration) error

func (*Browser) Run

func (browser *Browser) Run() error

func (*Browser) Screenshot

func (browser *Browser) Screenshot(width int, height int, sigma float64) ([]byte, string, error)

func (*Browser) Startup

func (browser *Browser) Startup() error

func (*Browser) Tasks

func (browser *Browser) Tasks(tasks chromedp.Tasks) error

type MouseAction

type MouseAction chromedp.Action

MouseAction are mouse input event actions

func MouseClickElementAction

func MouseClickElementAction(element string, opts ...chromedp.MouseOption) MouseAction

MouseClickXYAction is an action that sends a left mouse button click (ie, mousePressed and mouseReleased event) to the X, Y location.

func MouseClickXYAction

func MouseClickXYAction(x, y float64, opts ...chromedp.MouseOption) MouseAction

MouseClickXYAction is an action that sends a left mouse button click (ie, mousePressed and mouseReleased event) to the X, Y location.

Jump to

Keyboard shortcuts

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