browser

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2021 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	FailedLoadReloadDelay = time.Second * 10
)

Functions

This section is empty.

Types

type BasicAuthCredentials

type BasicAuthCredentials struct {
	Username string
	Password string
}

type Browser

type Browser struct {
	Context context.Context
	Tabs    []Tab

	Close func()
}

func NewBrowser

func NewBrowser() Browser

func (*Browser) NewTab

func (b *Browser) NewTab() Tab

type BrowserManager

type BrowserManager struct {
	Browser Browser
	Config  config.Configuration
}

func NewBrowserManager

func NewBrowserManager(c config.Configuration) BrowserManager

func (*BrowserManager) Close

func (bm *BrowserManager) Close()

func (*BrowserManager) Pause

func (bm *BrowserManager) Pause()

func (*BrowserManager) Resume

func (bm *BrowserManager) Resume()

func (*BrowserManager) Start

func (bm *BrowserManager) Start()

type Tab

type Tab struct {
	Browser Browser
	Context context.Context

	Close func()
	// contains filtered or unexported fields
}

func (*Tab) AddCSS

func (t *Tab) AddCSS(css string)

func (*Tab) AddJS

func (t *Tab) AddJS(script string)

func (*Tab) Focus

func (t *Tab) Focus()

func (*Tab) Navigate

func (t *Tab) Navigate(url string)

func (*Tab) NavigateWithBasicAuth

func (t *Tab) NavigateWithBasicAuth(url string, creds BasicAuthCredentials)

func (*Tab) Reload

func (t *Tab) Reload()

Jump to

Keyboard shortcuts

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