Versions in this module Expand all Collapse all v0 v0.1.4 Aug 11, 2022 v0.1.3 Aug 10, 2022 v0.1.2 Aug 5, 2022 v0.1.1 Aug 4, 2022 Changes in this version + const AllowDownload + const AltKey + const CommandKey + const CtrlKey + const DefaultDownload + const DenyDownload + const ErrorReasonAborted + const ErrorReasonAccessDenied + const ErrorReasonAddressUnreachable + const ErrorReasonBlockedByClient + const ErrorReasonBlockedByResponse + const ErrorReasonConnectionAborted + const ErrorReasonConnectionClosed + const ErrorReasonConnectionFailed + const ErrorReasonConnectionRefused + const ErrorReasonConnectionReset + const ErrorReasonFailed + const ErrorReasonInternetDisconnected + const ErrorReasonNameNotResolved + const ErrorReasonTimedOut + const EventClosed + const EventDisconnect + const MetaKey + const MouseMove + const MousePress + const MouseRelease + const NameDownload + const NavigationCancel + const NavigationCancelAndIgnore + const NavigationProceed + const NoModifier + const RequestStageRequest + const RequestStageResponse + const ResourceTypeCSPViolationReport + const ResourceTypeDocument + const ResourceTypeEventSource + const ResourceTypeFetch + const ResourceTypeFont + const ResourceTypeImage + const ResourceTypeManifest + const ResourceTypeMedia + const ResourceTypeOther + const ResourceTypePing + const ResourceTypeScript + const ResourceTypeSignedExchange + const ResourceTypeStylesheet + const ResourceTypeTextTrack + const ResourceTypeWebSocket + const ResourceTypeXHR + const ShiftKey + const StageHeadersReceived + const StageRequest + const VirtualTimePolicyAdvance + const VirtualTimePolicyPause + const VirtualTimePolicyPauseIfNetworkFetchesPending + var ErrorClose = errors.New("closed") + var ErrorNoActiveTab = errors.New("no active tab") + var ErrorNoResponse = errors.New("no response") + var ErrorNoWsURL = errors.New("no websocket URL") + var MaxReadBufferSize = 0 + var MaxWriteBufferSize = 100 * 1024 + func AddDebugger(targetId string, baseWsUrl string) error + func AddEventListener(method string, cb EventCallback) + func Budget(budget int) setVirtualTimerPolicyOption + func InitialVirtualTime(t time.Time) setVirtualTimerPolicyOption + func MaxVirtualTimeTaskStarvationCount(max int) setVirtualTimerPolicyOption + func StopCapture() + func WaitForNavigation(wait bool) setVirtualTimerPolicyOption + type ConnectOption func(c *httpclient.HttpClient) + func Headers(headers map[string]string) ConnectOption + func Host(host string) ConnectOption + type Cookie struct + Domain string + Expires float64 + HttpOnly bool + Name string + Path string + SameSite string + Secure bool + Session bool + Size int + Value string + type Domain struct + Name string + Version string + type DownloadBehavior string + type ErrorReason string + type EvaluateError struct + ErrorDetails map[string]interface{} + ExceptionDetails map[string]interface{} + func (err EvaluateError) Error() string + type EvaluateOption func(params Params) + func GeneratePreview(enable bool) EvaluateOption + func IncludeCommandLineAPI(enable bool) EvaluateOption + func ReturnByValue(enable bool) EvaluateOption + func Silent(enable bool) EvaluateOption + func ThrowOnSideEffect(enable bool) EvaluateOption + func UserGesture(enable bool) EvaluateOption + type EventCallback func(params Params) + func ConsoleAPICallback(cb func([]interface{})) EventCallback + type FetchRequestPattern struct + RequestStage RequestStage + ResourceType ResourceType + UrlPattern string + type IdType int + const BackendNodeId + const NodeId + const ObjectId + type InterceptionStage string + type KeyModifier int + type MouseEvent string + type MouseOption func(p Params) + func Clicks(c int) MouseOption + func LeftButton() MouseOption + func MiddleButton() MouseOption + func Modifiers(m KeyModifier) MouseOption + func RightButton() MouseOption + type NavigationEntry struct + ID int64 + Title string + URL string + type NavigationError string + func (err NavigationError) Error() string + type NavigationResponse string + type Params map[string]interface + func (p Params) Bool(k string) bool + func (p Params) Float64(k string) float64 + func (p Params) Int(k string) int + func (p Params) Map(k string) map[string]interface{} + func (p Params) String(k string) string + type PrintToPDFOption func(map[string]interface{}) + func Dimensions(width, height float64) PrintToPDFOption + func DisplayHeaderFooter() PrintToPDFOption + func LandscapeMode() PrintToPDFOption + func Margins(top, bottom, left, right float64) PrintToPDFOption + func PageRanges(ranges string) PrintToPDFOption + func PortraitMode() PrintToPDFOption + func PrintBackground() PrintToPDFOption + func Scale(n float64) PrintToPDFOption + type Profile struct + EndTime int64 + Nodes []ProfileNode + Samples []int64 + StartTime int64 + TimeDeltas []int64 + type ProfileNode struct + CallFrame json.RawMessage + Children []int64 + DeoptReason string + HitCount int64 + ID int64 + PositionTicks json.RawMessage + type RemoteDebugger struct + func StartCapture(port string, verbose bool, options ...ConnectOption) (*RemoteDebugger, error) + func (remote *RemoteDebugger) ActivateTab(tab *Tab) error + func (remote *RemoteDebugger) AllEvents(enable bool) error + func (remote *RemoteDebugger) CaptureScreenshot(format string, quality int, fromSurface bool) ([]byte, error) + func (remote *RemoteDebugger) ClearBrowserCache() error + func (remote *RemoteDebugger) ClearBrowserCookies() error + func (remote *RemoteDebugger) Close() (err error) + func (remote *RemoteDebugger) CloseBrowser() + func (remote *RemoteDebugger) CloseTab(tab *Tab) error + func (remote *RemoteDebugger) ContinueInterceptedRequest(interceptionID string, errorReason ErrorReason, rawResponse string, url string, ...) error + func (remote *RemoteDebugger) ContinueRequest(requestID string, url string, method string, postData string, ...) error + func (remote *RemoteDebugger) DOMEvents(enable bool) error + func (remote *RemoteDebugger) DeleteCookies(name, url, domain, path string) error + func (remote *RemoteDebugger) DomainEvents(domain string, enable bool) error + func (remote *RemoteDebugger) EmulationEvents(enable bool) error + func (remote *RemoteDebugger) EnableRequestInterception(enabled bool) error + func (remote *RemoteDebugger) EnableRequestPaused(enable bool, patterns ...FetchRequestPattern) error + func (remote *RemoteDebugger) Evaluate(expr string, options ...EvaluateOption) (interface{}, error) + func (remote *RemoteDebugger) EvaluateWrap(expr string, options ...EvaluateOption) (interface{}, error) + func (remote *RemoteDebugger) FailRequest(requestID string, errorReason ErrorReason) error + func (remote *RemoteDebugger) FetchResponseBody(requestId string) ([]byte, error) + func (remote *RemoteDebugger) Focus(nodeID int) error + func (remote *RemoteDebugger) FulfillRequest(requestID string, responseCode int, responsePhrase string, ...) error + func (remote *RemoteDebugger) GetAllCookies() ([]Cookie, error) + func (remote *RemoteDebugger) GetBoxModel(nodeID int) (map[string]interface{}, error) + func (remote *RemoteDebugger) GetCertificate(origin string) ([]string, error) + func (remote *RemoteDebugger) GetComputedStyleForNode(nodeID int) (map[string]interface{}, error) + func (remote *RemoteDebugger) GetCookies(urls []string) ([]Cookie, error) + func (remote *RemoteDebugger) GetDocument() (map[string]interface{}, error) + func (remote *RemoteDebugger) GetDomains() ([]Domain, error) + func (remote *RemoteDebugger) GetNavigationHistory() (int, []NavigationEntry, error) + func (remote *RemoteDebugger) GetOuterHTML(nodeID int) (string, error) + func (remote *RemoteDebugger) GetPreciseCoverage(precise bool) ([]interface{}, error) + func (remote *RemoteDebugger) GetResponseBody(req string) ([]byte, error) + func (remote *RemoteDebugger) GetResponseBodyForInterception(iid string) ([]byte, error) + func (remote *RemoteDebugger) GetTitle(requestId string) string + func (remote *RemoteDebugger) HandleJavaScriptDialog(accept bool, promptText string) error + func (remote *RemoteDebugger) LogEvents(enable bool) error + func (remote *RemoteDebugger) MouseEvent(ev MouseEvent, x, y int, options ...MouseOption) error + func (remote *RemoteDebugger) Navigate(url string) (string, error) + func (remote *RemoteDebugger) NetworkEvents(enable bool) error + func (remote *RemoteDebugger) NewTab(url string) (*Tab, error) + func (remote *RemoteDebugger) PageEvents(enable bool) error + func (remote *RemoteDebugger) PrintToPDF(options ...PrintToPDFOption) ([]byte, error) + func (remote *RemoteDebugger) ProcessNavigation(navigationID int, navigation NavigationResponse) error + func (remote *RemoteDebugger) ProfilerEvents(enable bool) error + func (remote *RemoteDebugger) Protocol() (map[string]interface{}, error) + func (remote *RemoteDebugger) QuerySelector(nodeID int, selector string) (map[string]interface{}, error) + func (remote *RemoteDebugger) QuerySelectorAll(nodeID int, selector string) (map[string]interface{}, error) + func (remote *RemoteDebugger) Reload() error + func (remote *RemoteDebugger) RequestNode(nodeID int) error + func (remote *RemoteDebugger) ResolveNode(nodeID int) (map[string]interface{}, error) + func (remote *RemoteDebugger) RuntimeEvents(enable bool) error + func (remote *RemoteDebugger) SavePDF(filename string, perm os.FileMode, options ...PrintToPDFOption) error + func (remote *RemoteDebugger) SaveScreenshot(filename string, perm os.FileMode, quality int, fromSurface bool) error + func (remote *RemoteDebugger) SendRequest(method string, params Params) (map[string]interface{}, error) + func (remote *RemoteDebugger) SendRune(c rune) error + func (remote *RemoteDebugger) ServiceWorkerEvents(enable bool) error + func (remote *RemoteDebugger) SetAttributeValue(nodeID int, name, value string) error + func (remote *RemoteDebugger) SetBlockedURLs(urls ...string) error + func (remote *RemoteDebugger) SetBypassServiceWorker(bypass bool) error + func (remote *RemoteDebugger) SetCacheDisabled(disabled bool) error + func (remote *RemoteDebugger) SetControlNavigations(enabled bool) error + func (remote *RemoteDebugger) SetCookie(cookie Cookie) bool + func (remote *RemoteDebugger) SetCookies(cookies []Cookie) error + func (remote *RemoteDebugger) SetDeviceMetricsOverride(width int, height int, deviceScaleFactor float64, mobile bool, fitWindow bool) error + func (remote *RemoteDebugger) SetDownloadBehavior(behavior DownloadBehavior, downloadPath string) error + func (remote *RemoteDebugger) SetFileInputFiles(id int, files []string, idType IdType) error + func (remote *RemoteDebugger) SetInputFiles(nodeID int, files []string) error + func (remote *RemoteDebugger) SetOuterHTML(nodeID int, outerHTML string) error + func (remote *RemoteDebugger) SetProfilerSamplingInterval(n int64) error + func (remote *RemoteDebugger) SetRequestInterception(patterns ...RequestPattern) error + func (remote *RemoteDebugger) SetUserAgent(userAgent string) error + func (remote *RemoteDebugger) SetVirtualTimePolicy(policy VirtualTimePolicy, budget int, options ...setVirtualTimerPolicyOption) error + func (remote *RemoteDebugger) SetVisibleSize(width, height int) error + func (remote *RemoteDebugger) StartPreciseCoverage(callCount, detailed bool) error + func (remote *RemoteDebugger) StartProfiler() error + func (remote *RemoteDebugger) StopPreciseCoverage() error + func (remote *RemoteDebugger) StopProfiler() (p Profile, err error) + func (remote *RemoteDebugger) TabList(filter string) ([]*Tab, error) + func (remote *RemoteDebugger) TargetEvents(enable bool) error + func (remote *RemoteDebugger) TargetId() string + func (remote *RemoteDebugger) Verbose(v bool) + func (remote *RemoteDebugger) Version() (*Version, error) + type RequestPattern struct + InterceptionStage InterceptionStage + ResourceType ResourceType + UrlPattern string + type RequestStage string + type ResourceType string + type Tab struct + Description string + DevURL string + ID string + Title string + Type string + URL string + WsURL string + type Version struct + Browser string + ProtocolVersion string + UserAgent string + V8Version string + WebKitVersion string + type VirtualTimePolicy string