chrome

package
v0.0.0-...-fd5f1f5 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const CallTimeout = 60 * time.Second

Variables

View Source
var ErrStatusFalse = errors.New("status=False(((")

todo: StatusFalse error

Functions

func CopyMap

func CopyMap(m map[string]interface{}) map[string]interface{}

Types

type Driver

type Driver struct {
	Host string
	// contains filtered or unexported fields
}

func NewChromeDriver

func NewChromeDriver(host string) *Driver

func (*Driver) Call

func (d *Driver) Call(ctx context.Context, methodname string, msg M, timeout time.Duration) (M, error)

func (*Driver) Close

func (d *Driver) Close()

func (*Driver) CountOcurrences

func (d *Driver) CountOcurrences(ctx context.Context, tabid int, substr string) (int, error)

func (*Driver) CountOcurrencesDom

func (d *Driver) CountOcurrencesDom(ctx context.Context, tabid int, substr string) (int, error)

func (*Driver) Eval

func (d *Driver) Eval(ctx context.Context, tabid int, code string) (M, error)

func (*Driver) EvalInCurrentTab

func (d *Driver) EvalInCurrentTab(ctx context.Context, code string) (M, error)

func (*Driver) Events

func (d *Driver) Events(ctx context.Context) chan M

func (*Driver) PageSource

func (d *Driver) PageSource(ctx context.Context, tabid int) (string, error)

func (*Driver) Ping

func (d *Driver) Ping(ctx context.Context) (M, error)

func (*Driver) TabCreate

func (d *Driver) TabCreate(ctx context.Context, createProperties M) (int, error)

func (*Driver) TabCreateWithTimeout

func (d *Driver) TabCreateWithTimeout(ctx context.Context, createProperties M, timeout time.Duration) (int, error)

func (*Driver) TabRemove

func (d *Driver) TabRemove(ctx context.Context, tabid int) (M, error)

type M

type M map[string]interface{}

Jump to

Keyboard shortcuts

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