browser

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateActionSequence

func GenerateActionSequence(taskAction taskstypes.Action, taskCreds *taskstypes.Credentials, tfaCode string) (chromedp.Action, error)

GenerateActionSequence translates a task Action into a chromedp Action. It takes credentials and the current tfaCode separately to avoid importing the full task state logic.

Types

type Manager

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

func NewManager

func NewManager(cfg *config.BrowserConfig, logger *log.Logger) (*Manager, error)

func (*Manager) ClearCookiesAction

func (m *Manager) ClearCookiesAction() chromedp.Action

func (*Manager) ExecuteTask

func (m *Manager) ExecuteTask(task *taskstypes.Task) (*taskstypes.TaskResult, error)

ExecuteTask implements the tasks.BrowserExecutor interface.

func (*Manager) GetCookiesAction

func (m *Manager) GetCookiesAction(cookies *[]*network.Cookie) chromedp.Action

func (*Manager) GetCurrentURLAction

func (m *Manager) GetCurrentURLAction(url *string) chromedp.Action

func (*Manager) GetPageTitleAction

func (m *Manager) GetPageTitleAction(title *string) chromedp.Action

func (*Manager) SetCookiesAction

func (m *Manager) SetCookiesAction(cookies []*network.CookieParam) chromedp.Action

func (*Manager) Shutdown

func (m *Manager) Shutdown(ctx context.Context) error

Shutdown implements the tasks.BrowserExecutor interface.

Jump to

Keyboard shortcuts

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