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
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
type NavigationType ¶
type NavigationType string
NavigationType represents the type of navigation
const ( NavigationTypeForm NavigationType = "form" NavigationTypeButton NavigationType = "button" NavigationTypeLink NavigationType = "link" 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 *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
Click to show internal directories.
Click to hide internal directories.