chromedriver

package
v0.0.0-...-b78158d Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Hook

type Hook func(pid int)

type LogLevel

type LogLevel string
const (
	// ALL, DEBUG, INFO, WARNING, SEVERE, OFF
	All     LogLevel = "ALL"
	Debug   LogLevel = "DEBUG"
	Info    LogLevel = "INFO"
	Warning LogLevel = "WARNING"
	Severe  LogLevel = "SEVERE"
	Off     LogLevel = "OFF"
)

func (LogLevel) Validate

func (ll LogLevel) Validate() error

type Option

type Option func(cd *Process)

func WithAdbPort

func WithAdbPort(port int) Option

WithAdbPort adb server port

func WithAppendLog

func WithAppendLog() Option

WithAppendLog append log file instead of rewriting

func WithBaseURL

func WithBaseURL(url string) Option

WithBaseURL base URL path prefix for commands, e.g. wd/url

func WithLogLevel

func WithLogLevel(ll LogLevel) Option

WithLogLevel log level: ALL, DEBUG, INFO, WARNING, SEVERE, OFF

func WithLogPath

func WithLogPath(path string) Option

WithLogPath write server log to file instead of stderr

func WithPort

func WithPort(port int) Option

WithPort port to listen on

func WithReadableTimestamp

func WithReadableTimestamp() Option

WithReadableTimestamp add readable timestamps to log

func WithReplayable

func WithReplayable() Option

WithReplayable (experimental) log verbosely and don't truncate long strings so that the log can be replayed.

func WithRunHook

func WithRunHook(hook Hook) Option

func WithShowVersion

func WithShowVersion() Option

WithShowVersion print the version number and exit

func WithSilent

func WithSilent() Option

WithSilent log nothing

func WithStderr

func WithStderr(writer io.Writer) Option

func WithStdout

func WithStdout(writer io.Writer) Option

func WithStopHook

func WithStopHook(hook Hook) Option

func WithVerbose

func WithVerbose() Option

WithVerbose log verbosely

func WithWhitelistedIps

func WithWhitelistedIps(ips []string) Option

WithWhitelistedIps whitelist of remote IP addresses which are allowed to connect to ChromeDriver

type Process

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

func New

func New(bin string, opts ...Option) (*Process, error)

New returns a new instance of Process.

func (*Process) Args

func (d *Process) Args() []string

func (*Process) Run

func (d *Process) Run(ctx context.Context) error

func (*Process) Stop

func (d *Process) Stop(_ context.Context) error

Jump to

Keyboard shortcuts

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