types

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2026 License: MIT Imports: 6 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	IsDiagnosticEnabled = false
)

Functions

This section is empty.

Types

type Action

type Action struct {
	OriginID string       `json:"origin_id,omitempty"`
	Type     ActionType   `json:"type,omitempty"`
	Input    string       `json:"input,omitempty"`
	Element  *HTMLElement `json:"element,omitempty"`
	Form     *HTMLForm    `json:"form,omitempty"`
	Depth    int          `json:"depth,omitempty"`
	ResultID string       `json:"result_id,omitempty"`
}

Action is a action taken in the browser

func ActionFromEventListener

func ActionFromEventListener(listener *EventListener) *Action

func (*Action) Hash

func (a *Action) Hash() string

func (*Action) String

func (a *Action) String() string

type ActionType

type ActionType string
const (
	ActionTypeUnknown         ActionType = "unknown"
	ActionTypeLoadURL         ActionType = "load_url"
	ActionTypeExecuteJS       ActionType = "execute_js"
	ActionTypeLeftClick       ActionType = "left_click"
	ActionTypeLeftClickDown   ActionType = "left_click_down"
	ActionTypeLeftClickUp     ActionType = "left_click_up"
	ActionTypeRightClick      ActionType = "right_click"
	ActionTypeDoubleClick     ActionType = "double_click"
	ActionTypeScroll          ActionType = "scroll"
	ActionTypeSendKeys        ActionType = "send_keys"
	ActionTypeKeyUp           ActionType = "key_up"
	ActionTypeKeyDown         ActionType = "key_down"
	ActionTypeHover           ActionType = "hover"
	ActionTypeFocus           ActionType = "focus"
	ActionTypeBlur            ActionType = "blur"
	ActionTypeMouseOverAndOut ActionType = "mouse_over_and_out"
	ActionTypeMouseWheel      ActionType = "mouse_wheel"
	ActionTypeFillForm        ActionType = "fill_form"
	ActionTypeWait            ActionType = "wait"
	ActionTypeRedirect        ActionType = "redirect"
	ActionTypeSubRequest      ActionType = "sub_request"
)

type EventListener

type EventListener struct {
	Element  *HTMLElement `json:"element,omitempty"`
	Type     string       `json:"type,omitempty"`
	Listener string       `json:"listener,omitempty"`
}

type HTMLElement

type HTMLElement struct {
	TagName     string            `json:"tagName,omitempty"`
	ID          string            `json:"id,omitempty"`
	Classes     string            `json:"classes,omitempty"`
	Attributes  map[string]string `json:"attributes,omitempty"`
	Hidden      bool              `json:"hidden,omitempty"`
	OuterHTML   string            `json:"outerHTML,omitempty"`
	Type        string            `json:"type,omitempty"`
	Value       string            `json:"value,omitempty"`
	CSSSelector string            `json:"cssSelector,omitempty"`
	XPath       string            `json:"xpath,omitempty"`
	TextContent string            `json:"textContent,omitempty"`
	MD5Hash     string            `json:"md5Hash,omitempty"`
}

HTMLElement represents a DOM element

func (*HTMLElement) Hash

func (e *HTMLElement) Hash() string

func (*HTMLElement) String

func (e *HTMLElement) String() string

type HTMLForm

type HTMLForm struct {
	TagName     string            `json:"tagName,omitempty"`
	ID          string            `json:"id,omitempty"`
	Classes     string            `json:"classes,omitempty"`
	Attributes  map[string]string `json:"attributes,omitempty"`
	Hidden      bool              `json:"hidden,omitempty"`
	OuterHTML   string            `json:"outerHTML,omitempty"`
	Action      string            `json:"action,omitempty"`
	Method      string            `json:"method,omitempty"`
	Elements    []*HTMLElement    `json:"elements,omitempty"`
	CSSSelector string            `json:"cssSelector,omitempty"`
	XPath       string            `json:"xpath,omitempty"`
}

HTMLForm represents a form element

func (*HTMLForm) Hash

func (f *HTMLForm) Hash() string
type NavigationType string

NavigationType represents the type of navigation

const (
	// NavigationTypeForm represents a form navigation
	NavigationTypeForm NavigationType = "form"
	// NavigationTypeButton represents a button navigation
	NavigationTypeButton NavigationType = "button"
	// NavigationTypeLink represents a link navigation
	NavigationTypeLink NavigationType = "link"
	// NavigationTypeEventListener represents an event listener navigation
	NavigationTypeEventListener NavigationType = "eventlistener"
)

type PageState

type PageState struct {
	UniqueID    string `json:"unique_id,omitempty"`
	SimHash     uint64 `json:"sim_hash,omitempty"`
	OriginID    string `json:"origin_id,omitempty"`
	URL         string `json:"url,omitempty"`
	Title       string `json:"title,omitempty"`
	DOM         string `json:"dom,omitempty"`
	StrippedDOM string `json:"stripped_dom,omitempty"`
	Depth       int    `json:"depth,omitempty"`
	IsRoot      bool   `json:"is_root,omitempty"`

	// NavigationAction is actions taken to reach this state
	NavigationAction *Action `json:"navigation_actions,omitempty"`
}

PageState represents a page in the state of the web application as determined by the crawler. It represents the vertex of the crawl graph

Jump to

Keyboard shortcuts

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