Versions in this module Expand all Collapse all v3 v3.3.4 Sep 30, 2024 Changes in this version + var ActionStringToAction = map[string]ActionType + var ActionToActionString = map[ActionType]string + var ErrActionExecDealine = errkit.New("headless action execution deadline exceeded").SetKind(errkit.ErrKindDeadline).Build() + var ErrLFAccessDenied = errorutil.New("Use -allow-local-file-access flag to enable local file access") + func FetchContinueRequest(page *rod.Page, e *proto.FetchRequestPaused) error + func FetchGetResponseBody(page *rod.Page, e *proto.FetchRequestPaused) ([]byte, error) + func GetSameSite(cookie *http.Cookie) string + func MustDisableSandbox() bool + type Action struct + ActionType ActionTypeHolder + Data map[string]string + Description string + Name string + func (a *Action) GetArg(name string) string + func (a *Action) String() string + func (a Action) JSONSchemaExtend(schema *jsonschema.Schema) + type ActionData = mapsutil.Map[string, any] + type ActionType int8 + const ActionAddHeader + const ActionClick + const ActionDebug + const ActionDeleteHeader + const ActionExtract + const ActionFilesInput + const ActionGetResource + const ActionKeyboard + const ActionNavigate + const ActionRightClick + const ActionScreenshot + const ActionScript + const ActionSelectInput + const ActionSetBody + const ActionSetHeader + const ActionSetMethod + const ActionSleep + const ActionTextInput + const ActionTimeInput + const ActionWaitDOM + const ActionWaitDialog + const ActionWaitEvent + const ActionWaitFCP + const ActionWaitFMP + const ActionWaitIdle + const ActionWaitLoad + const ActionWaitStable + const ActionWaitVisible + func GetSupportedActionTypes() []ActionType + func (t ActionType) String() string + type ActionTypeHolder struct + ActionType ActionType + func (holder *ActionTypeHolder) MarshalJSON() ([]byte, error) + func (holder *ActionTypeHolder) UnmarshalJSON(data []byte) error + func (holder *ActionTypeHolder) UnmarshalYAML(unmarshal func(interface{}) error) error + func (holder ActionTypeHolder) JSONSchema() *jsonschema.Schema + func (holder ActionTypeHolder) MarshalYAML() (interface{}, error) + func (holder ActionTypeHolder) String() string + type Browser struct + func New(options *types.Options) (*Browser, error) + func (b *Browser) Close() + func (b *Browser) NewInstance() (*Instance, error) + func (b *Browser) SetUserAgent(customUserAgent string) + func (b *Browser) UserAgent() string + type Hijack struct + func NewHijack(page *rod.Page) *Hijack + func (h *Hijack) SetPattern(pattern *proto.FetchRequestPattern) + func (h *Hijack) Start(handler HijackHandler) func() error + func (h *Hijack) Stop() error + type HijackHandler = func(e *proto.FetchRequestPaused) error + type HistoryData struct + RawRequest string + RawResponse string + type Instance struct + func (i *Instance) Close() error + func (i *Instance) GetRequestLog() map[string]string + func (i *Instance) Run(input *contextargs.Context, actions []*Action, payloads map[string]interface{}, ...) (ActionData, *Page, error) + func (i *Instance) SetInteractsh(interactsh *interactsh.Client) + type Options struct + DisableCookie bool + Options *types.Options + Timeout time.Duration + type Page struct + History []HistoryData + InteractshURLs []string + func (p *Page) ActionAddHeader(act *Action, out ActionData) error + func (p *Page) ActionDeleteHeader(act *Action, out ActionData) error + func (p *Page) ActionSetBody(act *Action, out ActionData) error + func (p *Page) ActionSetHeader(act *Action, out ActionData) error + func (p *Page) ActionSetMethod(act *Action, out ActionData) error + func (p *Page) Browser() *rod.Browser + func (p *Page) ClickElement(act *Action, out ActionData) error + func (p *Page) Close() + func (p *Page) DebugAction(act *Action, out ActionData) error + func (p *Page) DumpHistory() string + func (p *Page) ExecuteActions(input *contextargs.Context, actions []*Action, ...) (outData ActionData, err error) + func (p *Page) ExtractElement(act *Action, out ActionData) error + func (p *Page) FilesInput(act *Action, out ActionData) error + func (p *Page) GetResource(act *Action, out ActionData) error + func (p *Page) HandleDialog(act *Action, out ActionData) error + func (p *Page) InputElement(act *Action, out ActionData) error + func (p *Page) KeyboardAction(act *Action, out ActionData) error + func (p *Page) NavigateURL(action *Action, out ActionData, allvars map[string]interface{}) error + func (p *Page) Page() *rod.Page + func (p *Page) RightClickElement(act *Action, out ActionData) error + func (p *Page) RunScript(action *Action, out ActionData) error + func (p *Page) Screenshot(act *Action, out ActionData) error + func (p *Page) SelectInputElement(act *Action, out ActionData) error + func (p *Page) SleepAction(act *Action, out ActionData) error + func (p *Page) Sleeper(pollTimeout, timeout time.Duration) *Page + func (p *Page) TimeInputElement(act *Action, out ActionData) error + func (p *Page) Timeout(timeout time.Duration) *Page + func (p *Page) URL() string + func (p *Page) WaitEvent(act *Action, out ActionData) (func() error, error) + func (p *Page) WaitPageLifecycleEvent(act *Action, out ActionData, event proto.PageLifecycleEventName) error + func (p *Page) WaitStable(act *Action, out ActionData) error + func (p *Page) WaitVisible(act *Action, out ActionData) error