browser

package
v0.0.0-...-6c55ccb Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2025 License: MIT Imports: 13 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 {
	// contains filtered or unexported fields
}

func GreenLight

func GreenLight(execPath string, isHeadless bool, startURL string, sessionDir string) *Browser

func (*Browser) DeleteCookies

func (b *Browser) DeleteCookies(name, domain string) error

func (*Browser) FindCookie

func (b *Browser) FindCookie(name, domain string) (Cookie, bool)

Find a specific cookie by name and domain

func (*Browser) GetCookies

func (b *Browser) GetCookies() ([]Cookie, error)

func (*Browser) NewPage

func (b *Browser) NewPage() *page.Page

func (*Browser) RedLight

func (b *Browser) RedLight()

func (*Browser) RefreshCookies

func (b *Browser) RefreshCookies() error

Refresh all cookies from the browser

func (*Browser) SendCommandWithResponse

func (b *Browser) SendCommandWithResponse(method string, params map[string]interface{}) (map[string]interface{}, error)

func (*Browser) SendCommandWithoutResponse

func (b *Browser) SendCommandWithoutResponse(method string, params map[string]interface{}) error

func (*Browser) SetCookie

func (b *Browser) SetCookie(cookie Cookie) error
type Cookie struct {
	Name     string  `json:"name"`
	Value    string  `json:"value"`
	Domain   string  `json:"domain"`
	Path     string  `json:"path"`
	Expires  float64 `json:"expires"`
	HTTPOnly bool    `json:"httpOnly"`
	Secure   bool    `json:"secure"`
	Session  bool    `json:"session"`
	SameSite string  `json:"sameSite"`
}

Jump to

Keyboard shortcuts

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