chrome

package
v0.0.0-...-75cde0a Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

README

To use this package you should download chromedriver firstly. More details see ChromeDriver - WebDriver for Chrome

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Broswer

type Broswer struct {
	selenium.WebDriver
	// contains filtered or unexported fields
}

Broswer chrome broswer instance

func NewBroswer

func NewBroswer(cfg Config) (*Broswer, error)

NewBroswer new a chrome broswer

func (*Broswer) Close

func (b *Broswer) Close() error

Close close broswer

func (*Broswer) DownloadDefaultDirectory

func (b *Broswer) DownloadDefaultDirectory() string

DownloadDefaultDirectory returns default download directory

func (*Broswer) IsOpenned

func (b *Broswer) IsOpenned() bool

IsOpenned returns true if broswer has been openned.

func (*Broswer) Open

func (b *Broswer) Open() error

Open open broswer

type Config

type Config struct {
	ChromeDriverPath  string
	Port              int
	Headless          bool
	UserAgent         string
	DownloadDirectory string // default download directory
	ProxyURL          string // proxy url
}

Config chrome config

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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