core

package
v0.0.0-...-90ed8b5 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action struct {
	Type         ActionType
	Delay        time.Duration
	XPath        string
	IframeXPath  string
	SearchIframe bool
	URL          string
	SwitchTab    bool
	FormDetails  *FormDetails
}

func (*Action) Perform

func (a *Action) Perform(ctx context.Context, initialTargets []*target.Info, contextStack *[]context.Context) (context.Context, error)

type ActionType

type ActionType string
const (
	Click          ActionType = "click"
	FormSubmit     ActionType = "formSubmit"
	Scrape         ActionType = "scrape"
	Navigate       ActionType = "navigate"
	Sleep          ActionType = "sleep"
	SwitchToIframe ActionType = "switchToIframe"
	ReturnToRoot   ActionType = "returnToRoot"
)

type FormDetails

type FormDetails struct {
	Fields []FormField
	Submit string
	Delay  time.Duration
}

type FormField

type FormField struct {
	XPath string
	Value string
}

type Procedures

type Procedures struct {
	Actions []Action
	UseGUI  bool // New field to control GUI
}

func NewProcedures

func NewProcedures(useGUI bool) *Procedures

func (*Procedures) Execute

func (p *Procedures) Execute(ctx context.Context, initialTargets []*target.Info) error

Jump to

Keyboard shortcuts

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