page

package
v0.0.0-...-4fec7a0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2017 License: BSD-2-Clause Imports: 6 Imported by: 1

Documentation

Overview

Actions and events related to the inspected page belong to the page domain.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddScriptToEvaluateOnLoadRequest

type AddScriptToEvaluateOnLoadRequest struct {
	// contains filtered or unexported fields
}

func (*AddScriptToEvaluateOnLoadRequest) Do

func (*AddScriptToEvaluateOnLoadRequest) ScriptSource

type AddScriptToEvaluateOnLoadResult

type AddScriptToEvaluateOnLoadResult struct {
	// Identifier of the added script.
	Identifier ScriptIdentifier `json:"identifier"`
}

type AppManifestError

type AppManifestError struct {
	// Error message.
	Message string `json:"message"`

	// If criticial, this is a non-recoverable parse error.
	Critical int `json:"critical"`

	// Error line.
	Line int `json:"line"`

	// Error column.
	Column int `json:"column"`
}

type CaptureScreenshotRequest

type CaptureScreenshotRequest struct {
	// contains filtered or unexported fields
}

func (*CaptureScreenshotRequest) Do

func (*CaptureScreenshotRequest) Format

Image compression format (defaults to png). (optional)

func (*CaptureScreenshotRequest) FromSurface

Capture the screenshot from the surface, rather than the view. Defaults to true. (optional, experimental)

func (*CaptureScreenshotRequest) Quality

Compression quality from range [0..100] (jpeg only). (optional)

type CaptureScreenshotResult

type CaptureScreenshotResult struct {
	// Base64-encoded image data.
	Data string `json:"data"`
}

type ClearDeviceMetricsOverrideRequest

type ClearDeviceMetricsOverrideRequest struct {
	// contains filtered or unexported fields
}

func (*ClearDeviceMetricsOverrideRequest) Do

type ClearDeviceOrientationOverrideRequest

type ClearDeviceOrientationOverrideRequest struct {
	// contains filtered or unexported fields
}

func (*ClearDeviceOrientationOverrideRequest) Do

type ClearGeolocationOverrideRequest

type ClearGeolocationOverrideRequest struct {
	// contains filtered or unexported fields
}

func (*ClearGeolocationOverrideRequest) Do

type Client

type Client struct {
	*rpc.Client
}

Actions and events related to the inspected page belong to the page domain.

func (*Client) AddScriptToEvaluateOnLoad

func (d *Client) AddScriptToEvaluateOnLoad() *AddScriptToEvaluateOnLoadRequest

(experimental)

func (*Client) CaptureScreenshot

func (d *Client) CaptureScreenshot() *CaptureScreenshotRequest

Capture page screenshot. (experimental)

func (*Client) ClearDeviceMetricsOverride

func (d *Client) ClearDeviceMetricsOverride() *ClearDeviceMetricsOverrideRequest

Clears the overriden device metrics. (experimental)

func (*Client) ClearDeviceOrientationOverride

func (d *Client) ClearDeviceOrientationOverride() *ClearDeviceOrientationOverrideRequest

Clears the overridden Device Orientation. (experimental)

func (*Client) ClearGeolocationOverride

func (d *Client) ClearGeolocationOverride() *ClearGeolocationOverrideRequest

Clears the overriden Geolocation Position and Error.

func (*Client) CreateIsolatedWorld

func (d *Client) CreateIsolatedWorld() *CreateIsolatedWorldRequest

Creates an isolated world for the given frame. (experimental)

func (*Client) DeleteCookie

func (d *Client) DeleteCookie() *DeleteCookieRequest

Deletes browser cookie with given name, domain and path. (experimental)

func (*Client) Disable

func (d *Client) Disable() *DisableRequest

Disables page domain notifications.

func (*Client) Enable

func (d *Client) Enable() *EnableRequest

Enables page domain notifications.

func (*Client) GetAppManifest

func (d *Client) GetAppManifest() *GetAppManifestRequest

(experimental)

func (*Client) GetCookies

func (d *Client) GetCookies() *GetCookiesRequest

Returns all browser cookies. Depending on the backend support, will return detailed cookie information in the <code>cookies</code> field. (experimental)

func (*Client) GetLayoutMetrics

func (d *Client) GetLayoutMetrics() *GetLayoutMetricsRequest

Returns metrics relating to the layouting of the page, such as viewport bounds/scale. (experimental)

func (*Client) GetNavigationHistory

func (d *Client) GetNavigationHistory() *GetNavigationHistoryRequest

Returns navigation history for the current page. (experimental)

func (*Client) GetResourceContent

func (d *Client) GetResourceContent() *GetResourceContentRequest

Returns content of the given resource. (experimental)

func (*Client) GetResourceTree

func (d *Client) GetResourceTree() *GetResourceTreeRequest

Returns present frame / resource tree structure. (experimental)

func (*Client) HandleJavaScriptDialog

func (d *Client) HandleJavaScriptDialog() *HandleJavaScriptDialogRequest

Accepts or dismisses a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload).

func (*Client) Navigate

func (d *Client) Navigate() *NavigateRequest

Navigates current page to the given URL.

func (*Client) NavigateToHistoryEntry

func (d *Client) NavigateToHistoryEntry() *NavigateToHistoryEntryRequest

Navigates current page to the given history entry. (experimental)

func (*Client) PrintToPDF

func (d *Client) PrintToPDF() *PrintToPDFRequest

Print page as PDF. (experimental)

func (*Client) ProcessNavigation

func (d *Client) ProcessNavigation() *ProcessNavigationRequest

Should be sent in response to a navigationRequested or a redirectRequested event, telling the browser how to handle the navigation. (experimental)

func (*Client) Reload

func (d *Client) Reload() *ReloadRequest

Reloads given page optionally ignoring the cache.

func (*Client) RemoveScriptToEvaluateOnLoad

func (d *Client) RemoveScriptToEvaluateOnLoad() *RemoveScriptToEvaluateOnLoadRequest

(experimental)

func (*Client) RequestAppBanner

func (d *Client) RequestAppBanner() *RequestAppBannerRequest

(experimental)

func (*Client) ScreencastFrameAck

func (d *Client) ScreencastFrameAck() *ScreencastFrameAckRequest

Acknowledges that a screencast frame has been received by the frontend. (experimental)

func (*Client) SearchInResource

func (d *Client) SearchInResource() *SearchInResourceRequest

Searches for given string in resource content. (experimental)

func (*Client) SetAutoAttachToCreatedPages

func (d *Client) SetAutoAttachToCreatedPages() *SetAutoAttachToCreatedPagesRequest

Controls whether browser will open a new inspector window for connected pages. (experimental)

func (*Client) SetControlNavigations

func (d *Client) SetControlNavigations() *SetControlNavigationsRequest

Toggles navigation throttling which allows programatic control over navigation and redirect response. (experimental)

func (*Client) SetDeviceMetricsOverride

func (d *Client) SetDeviceMetricsOverride() *SetDeviceMetricsOverrideRequest

Overrides the values of device screen dimensions (window.screen.width, window.screen.height, window.innerWidth, window.innerHeight, and "device-width"/"device-height"-related CSS media query results). (experimental)

func (*Client) SetDeviceOrientationOverride

func (d *Client) SetDeviceOrientationOverride() *SetDeviceOrientationOverrideRequest

Overrides the Device Orientation. (experimental)

func (*Client) SetDocumentContent

func (d *Client) SetDocumentContent() *SetDocumentContentRequest

Sets given markup as the document's HTML. (experimental)

func (*Client) SetGeolocationOverride

func (d *Client) SetGeolocationOverride() *SetGeolocationOverrideRequest

Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position unavailable.

func (*Client) SetTouchEmulationEnabled

func (d *Client) SetTouchEmulationEnabled() *SetTouchEmulationEnabledRequest

Toggles mouse event-based touch event emulation. (experimental)

func (*Client) StartScreencast

func (d *Client) StartScreencast() *StartScreencastRequest

Starts sending each frame using the <code>screencastFrame</code> event. (experimental)

func (*Client) StopLoading

func (d *Client) StopLoading() *StopLoadingRequest

Force the page stop all navigations and pending resource fetches. (experimental)

func (*Client) StopScreencast

func (d *Client) StopScreencast() *StopScreencastRequest

Stops sending each frame in the <code>screencastFrame</code>. (experimental)

type CreateIsolatedWorldRequest

type CreateIsolatedWorldRequest struct {
	// contains filtered or unexported fields
}

func (*CreateIsolatedWorldRequest) Do

func (*CreateIsolatedWorldRequest) FrameId

Id of the frame in which the isolated world should be created.

func (*CreateIsolatedWorldRequest) GrantUniveralAccess

func (r *CreateIsolatedWorldRequest) GrantUniveralAccess(v bool) *CreateIsolatedWorldRequest

Whether or not universal access should be granted to the isolated world. This is a powerful option, use with caution. (optional)

func (*CreateIsolatedWorldRequest) WorldName

An optional name which is reported in the Execution Context. (optional)

type DeleteCookieRequest

type DeleteCookieRequest struct {
	// contains filtered or unexported fields
}

func (*DeleteCookieRequest) CookieName

Name of the cookie to remove.

func (*DeleteCookieRequest) Do

func (r *DeleteCookieRequest) Do() error

func (*DeleteCookieRequest) URL

URL to match cooke domain and path.

type DialogType

type DialogType string

type DisableRequest

type DisableRequest struct {
	// contains filtered or unexported fields
}

func (*DisableRequest) Do

func (r *DisableRequest) Do() error

type DomContentEventFiredEvent

type DomContentEventFiredEvent struct {
	Timestamp float64 `json:"timestamp"`
}

type EnableRequest

type EnableRequest struct {
	// contains filtered or unexported fields
}

func (*EnableRequest) Do

func (r *EnableRequest) Do() error

type Frame

type Frame struct {
	// Frame unique identifier.
	Id string `json:"id"`

	// Parent frame identifier. (optional)
	ParentId string `json:"parentId,omitempty"`

	// Identifier of the loader associated with this frame.
	LoaderId network.LoaderId `json:"loaderId"`

	// Frame's name as specified in the tag. (optional)
	Name string `json:"name,omitempty"`

	// Frame document's URL.
	URL string `json:"url"`

	// Frame document's security origin.
	SecurityOrigin string `json:"securityOrigin"`

	// Frame document's mimeType as determined by the browser.
	MimeType string `json:"mimeType"`
}

type FrameAttachedEvent

type FrameAttachedEvent struct {
	// Id of the frame that has been attached.
	FrameId FrameId `json:"frameId"`

	// Parent frame identifier.
	ParentFrameId FrameId `json:"parentFrameId"`

	// JavaScript stack trace of when frame was attached, only set if frame initiated from script. (optional, experimental)
	Stack *runtime.StackTrace `json:"stack"`
}

Fired when frame has been attached to its parent.

type FrameClearedScheduledNavigationEvent

type FrameClearedScheduledNavigationEvent struct {
	// Id of the frame that has cleared its scheduled navigation.
	FrameId FrameId `json:"frameId"`
}

Fired when frame no longer has a scheduled navigation. (experimental)

type FrameDetachedEvent

type FrameDetachedEvent struct {
	// Id of the frame that has been detached.
	FrameId FrameId `json:"frameId"`
}

Fired when frame has been detached from its parent.

type FrameId

type FrameId string

type FrameNavigatedEvent

type FrameNavigatedEvent struct {
	// Frame object.
	Frame *Frame `json:"frame"`
}

Fired once navigation of the frame has completed. Frame is now associated with the new loader.

type FrameResizedEvent

type FrameResizedEvent struct {
}

(experimental)

type FrameResource

type FrameResource struct {
	// Resource URL.
	URL string `json:"url"`

	// Type of this resource.
	Type ResourceType `json:"type"`

	// Resource mimeType as determined by the browser.
	MimeType string `json:"mimeType"`

	// last-modified timestamp as reported by server. (optional)
	LastModified network.Timestamp `json:"lastModified,omitempty"`

	// Resource content size. (optional)
	ContentSize float64 `json:"contentSize,omitempty"`

	// True if the resource failed to load. (optional)
	Failed bool `json:"failed,omitempty"`

	// True if the resource was canceled during loading. (optional)
	Canceled bool `json:"canceled,omitempty"`
}

type FrameResourceTree

type FrameResourceTree struct {
	// Frame information for this tree item.
	Frame *Frame `json:"frame"`

	// Child frames. (optional)
	ChildFrames []*FrameResourceTree `json:"childFrames,omitempty"`

	// Information about frame resources.
	Resources []*FrameResource `json:"resources"`
}

type FrameScheduledNavigationEvent

type FrameScheduledNavigationEvent struct {
	// Id of the frame that has scheduled a navigation.
	FrameId FrameId `json:"frameId"`

	// Delay (in seconds) until the navigation is scheduled to begin. The navigation is not guaranteed to start.
	Delay float64 `json:"delay"`
}

Fired when frame schedules a potential navigation. (experimental)

type FrameStartedLoadingEvent

type FrameStartedLoadingEvent struct {
	// Id of the frame that has started loading.
	FrameId FrameId `json:"frameId"`
}

Fired when frame has started loading. (experimental)

type FrameStoppedLoadingEvent

type FrameStoppedLoadingEvent struct {
	// Id of the frame that has stopped loading.
	FrameId FrameId `json:"frameId"`
}

Fired when frame has stopped loading. (experimental)

type GetAppManifestRequest

type GetAppManifestRequest struct {
	// contains filtered or unexported fields
}

func (*GetAppManifestRequest) Do

type GetAppManifestResult

type GetAppManifestResult struct {
	// Manifest location.
	URL string `json:"url"`

	Errors []*AppManifestError `json:"errors"`

	// Manifest content. (optional)
	Data string `json:"data"`
}

type GetCookiesRequest

type GetCookiesRequest struct {
	// contains filtered or unexported fields
}

func (*GetCookiesRequest) Do

type GetCookiesResult

type GetCookiesResult struct {
	// Array of cookie objects.
	Cookies []*network.Cookie `json:"cookies"`
}

type GetLayoutMetricsRequest

type GetLayoutMetricsRequest struct {
	// contains filtered or unexported fields
}

func (*GetLayoutMetricsRequest) Do

type GetLayoutMetricsResult

type GetLayoutMetricsResult struct {
	// Metrics relating to the layout viewport.
	LayoutViewport *LayoutViewport `json:"layoutViewport"`

	// Metrics relating to the visual viewport.
	VisualViewport *VisualViewport `json:"visualViewport"`

	// Size of scrollable area.
	ContentSize *dom.Rect `json:"contentSize"`
}

type GetNavigationHistoryRequest

type GetNavigationHistoryRequest struct {
	// contains filtered or unexported fields
}

func (*GetNavigationHistoryRequest) Do

type GetNavigationHistoryResult

type GetNavigationHistoryResult struct {
	// Index of the current navigation history entry.
	CurrentIndex int `json:"currentIndex"`

	// Array of navigation history entries.
	Entries []*NavigationEntry `json:"entries"`
}

type GetResourceContentRequest

type GetResourceContentRequest struct {
	// contains filtered or unexported fields
}

func (*GetResourceContentRequest) Do

func (*GetResourceContentRequest) FrameId

Frame id to get resource for.

func (*GetResourceContentRequest) URL

URL of the resource to get content for.

type GetResourceContentResult

type GetResourceContentResult struct {
	// Resource content.
	Content string `json:"content"`

	// True, if content was served as base64.
	Base64Encoded bool `json:"base64Encoded"`
}

type GetResourceTreeRequest

type GetResourceTreeRequest struct {
	// contains filtered or unexported fields
}

func (*GetResourceTreeRequest) Do

type GetResourceTreeResult

type GetResourceTreeResult struct {
	// Present frame / resource tree structure.
	FrameTree *FrameResourceTree `json:"frameTree"`
}

type HandleJavaScriptDialogRequest

type HandleJavaScriptDialogRequest struct {
	// contains filtered or unexported fields
}

func (*HandleJavaScriptDialogRequest) Accept

Whether to accept or dismiss the dialog.

func (*HandleJavaScriptDialogRequest) Do

func (*HandleJavaScriptDialogRequest) PromptText

The text to enter into the dialog prompt before accepting. Used only if this is a prompt dialog. (optional)

type InterstitialHiddenEvent

type InterstitialHiddenEvent struct {
}

Fired when interstitial page was hidden

type InterstitialShownEvent

type InterstitialShownEvent struct {
}

Fired when interstitial page was shown

type JavascriptDialogClosedEvent

type JavascriptDialogClosedEvent struct {
	// Whether dialog was confirmed.
	Result bool `json:"result"`
}

Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) has been closed.

type JavascriptDialogOpeningEvent

type JavascriptDialogOpeningEvent struct {
	// Message that will be displayed by the dialog.
	Message string `json:"message"`

	// Dialog type.
	Type DialogType `json:"type"`
}

Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) is about to open.

type LayoutViewport

type LayoutViewport struct {
	// Horizontal offset relative to the document (CSS pixels).
	PageX int `json:"pageX"`

	// Vertical offset relative to the document (CSS pixels).
	PageY int `json:"pageY"`

	// Width (CSS pixels), excludes scrollbar if present.
	ClientWidth int `json:"clientWidth"`

	// Height (CSS pixels), excludes scrollbar if present.
	ClientHeight int `json:"clientHeight"`
}

type LoadEventFiredEvent

type LoadEventFiredEvent struct {
	Timestamp float64 `json:"timestamp"`
}
type NavigateRequest struct {
	// contains filtered or unexported fields
}
func (r *NavigateRequest) Do() (*NavigateResult, error)
func (r *NavigateRequest) Referrer(v string) *NavigateRequest

Referrer URL. (optional, experimental)

func (r *NavigateRequest) TransitionType(v TransitionType) *NavigateRequest

Intended transition type. (optional, experimental)

URL to navigate the page to.

type NavigateResult struct {
	// Frame id that will be navigated.
	FrameId FrameId `json:"frameId"`
}
type NavigateToHistoryEntryRequest struct {
	// contains filtered or unexported fields
}

Unique id of the entry to navigate to.

type NavigationEntry struct {
	// Unique id of the navigation history entry.
	Id int `json:"id"`

	// URL of the navigation history entry.
	URL string `json:"url"`

	// URL that the user typed in the url bar.
	UserTypedURL string `json:"userTypedURL"`

	// Title of the navigation history entry.
	Title string `json:"title"`

	// Transition type.
	TransitionType TransitionType `json:"transitionType"`
}
type NavigationRequestedEvent struct {
	// Whether the navigation is taking place in the main frame or in a subframe.
	IsInMainFrame bool `json:"isInMainFrame"`

	// Whether the navigation has encountered a server redirect or not.
	IsRedirect bool `json:"isRedirect"`

	NavigationId int `json:"navigationId"`

	// URL of requested navigation.
	URL string `json:"url"`
}

Fired when a navigation is started if navigation throttles are enabled. The navigation will be deferred until processNavigation is called.

type NavigationResponse string

type PrintToPDFRequest

type PrintToPDFRequest struct {
	// contains filtered or unexported fields
}

func (*PrintToPDFRequest) DisplayHeaderFooter

func (r *PrintToPDFRequest) DisplayHeaderFooter(v bool) *PrintToPDFRequest

Display header and footer. Defaults to false. (optional)

func (*PrintToPDFRequest) Do

func (*PrintToPDFRequest) Landscape

func (r *PrintToPDFRequest) Landscape(v bool) *PrintToPDFRequest

Paper orientation. Defaults to false. (optional)

func (*PrintToPDFRequest) MarginBottom

func (r *PrintToPDFRequest) MarginBottom(v float64) *PrintToPDFRequest

Bottom margin in inches. Defaults to 1cm (~0.4 inches). (optional)

func (*PrintToPDFRequest) MarginLeft

func (r *PrintToPDFRequest) MarginLeft(v float64) *PrintToPDFRequest

Left margin in inches. Defaults to 1cm (~0.4 inches). (optional)

func (*PrintToPDFRequest) MarginRight

func (r *PrintToPDFRequest) MarginRight(v float64) *PrintToPDFRequest

Right margin in inches. Defaults to 1cm (~0.4 inches). (optional)

func (*PrintToPDFRequest) MarginTop

func (r *PrintToPDFRequest) MarginTop(v float64) *PrintToPDFRequest

Top margin in inches. Defaults to 1cm (~0.4 inches). (optional)

func (*PrintToPDFRequest) PageRanges

func (r *PrintToPDFRequest) PageRanges(v string) *PrintToPDFRequest

Paper ranges to print, e.g., '1-5, 8, 11-13'. Defaults to the empty string, which means print all pages. (optional)

func (*PrintToPDFRequest) PaperHeight

func (r *PrintToPDFRequest) PaperHeight(v float64) *PrintToPDFRequest

Paper height in inches. Defaults to 11 inches. (optional)

func (*PrintToPDFRequest) PaperWidth

func (r *PrintToPDFRequest) PaperWidth(v float64) *PrintToPDFRequest

Paper width in inches. Defaults to 8.5 inches. (optional)

func (*PrintToPDFRequest) PrintBackground

func (r *PrintToPDFRequest) PrintBackground(v bool) *PrintToPDFRequest

Print background graphics. Defaults to false. (optional)

func (*PrintToPDFRequest) Scale

Scale of the webpage rendering. Defaults to 1. (optional)

type PrintToPDFResult

type PrintToPDFResult struct {
	// Base64-encoded pdf data.
	Data string `json:"data"`
}

type ProcessNavigationRequest

type ProcessNavigationRequest struct {
	// contains filtered or unexported fields
}

func (*ProcessNavigationRequest) Do

func (*ProcessNavigationRequest) NavigationId

func (*ProcessNavigationRequest) Response

type ReloadRequest

type ReloadRequest struct {
	// contains filtered or unexported fields
}

func (*ReloadRequest) Do

func (r *ReloadRequest) Do() error

func (*ReloadRequest) IgnoreCache

func (r *ReloadRequest) IgnoreCache(v bool) *ReloadRequest

If true, browser cache is ignored (as if the user pressed Shift+refresh). (optional)

func (*ReloadRequest) ScriptToEvaluateOnLoad

func (r *ReloadRequest) ScriptToEvaluateOnLoad(v string) *ReloadRequest

If set, the script will be injected into all frames of the inspected page after reload. (optional)

type RemoveScriptToEvaluateOnLoadRequest

type RemoveScriptToEvaluateOnLoadRequest struct {
	// contains filtered or unexported fields
}

func (*RemoveScriptToEvaluateOnLoadRequest) Do

func (*RemoveScriptToEvaluateOnLoadRequest) Identifier

type RequestAppBannerRequest

type RequestAppBannerRequest struct {
	// contains filtered or unexported fields
}

func (*RequestAppBannerRequest) Do

type ResourceType

type ResourceType string

type ScreencastFrameAckRequest

type ScreencastFrameAckRequest struct {
	// contains filtered or unexported fields
}

func (*ScreencastFrameAckRequest) Do

func (*ScreencastFrameAckRequest) SessionId

Frame number.

type ScreencastFrameEvent

type ScreencastFrameEvent struct {
	// Base64-encoded compressed image.
	Data string `json:"data"`

	// Screencast frame metadata.
	Metadata *ScreencastFrameMetadata `json:"metadata"`

	// Frame number.
	SessionId int `json:"sessionId"`
}

Compressed image data requested by the <code>startScreencast</code>. (experimental)

type ScreencastFrameMetadata

type ScreencastFrameMetadata struct {
	// Top offset in DIP.
	OffsetTop float64 `json:"offsetTop"`

	// Page scale factor.
	PageScaleFactor float64 `json:"pageScaleFactor"`

	// Device screen width in DIP.
	DeviceWidth float64 `json:"deviceWidth"`

	// Device screen height in DIP.
	DeviceHeight float64 `json:"deviceHeight"`

	// Position of horizontal scroll in CSS pixels.
	ScrollOffsetX float64 `json:"scrollOffsetX"`

	// Position of vertical scroll in CSS pixels.
	ScrollOffsetY float64 `json:"scrollOffsetY"`

	// Frame swap timestamp. (optional, experimental)
	Timestamp float64 `json:"timestamp,omitempty"`
}

type ScreencastVisibilityChangedEvent

type ScreencastVisibilityChangedEvent struct {
	// True if the page is visible.
	Visible bool `json:"visible"`
}

Fired when the page with currently enabled screencast was shown or hidden </code>. (experimental)

type ScriptIdentifier

type ScriptIdentifier string

type SearchInResourceRequest

type SearchInResourceRequest struct {
	// contains filtered or unexported fields
}

func (*SearchInResourceRequest) CaseSensitive

If true, search is case sensitive. (optional)

func (*SearchInResourceRequest) Do

func (*SearchInResourceRequest) FrameId

Frame id for resource to search in.

func (*SearchInResourceRequest) IsRegex

If true, treats string parameter as regex. (optional)

func (*SearchInResourceRequest) Query

String to search for.

func (*SearchInResourceRequest) URL

URL of the resource to search in.

type SearchInResourceResult

type SearchInResourceResult struct {
	// List of search matches.
	Result []*debugger.SearchMatch `json:"result"`
}

type SetAutoAttachToCreatedPagesRequest

type SetAutoAttachToCreatedPagesRequest struct {
	// contains filtered or unexported fields
}

func (*SetAutoAttachToCreatedPagesRequest) AutoAttach

If true, browser will open a new inspector window for every page created from this one.

func (*SetAutoAttachToCreatedPagesRequest) Do

type SetControlNavigationsRequest

type SetControlNavigationsRequest struct {
	// contains filtered or unexported fields
}

func (*SetControlNavigationsRequest) Do

func (*SetControlNavigationsRequest) Enabled

type SetDeviceMetricsOverrideRequest

type SetDeviceMetricsOverrideRequest struct {
	// contains filtered or unexported fields
}

func (*SetDeviceMetricsOverrideRequest) DeviceScaleFactor

Overriding device scale factor value. 0 disables the override.

func (*SetDeviceMetricsOverrideRequest) Do

func (*SetDeviceMetricsOverrideRequest) FitWindow

Whether a view that exceeds the available browser window area should be scaled down to fit.

func (*SetDeviceMetricsOverrideRequest) Height

Overriding height value in pixels (minimum 0, maximum 10000000). 0 disables the override.

func (*SetDeviceMetricsOverrideRequest) Mobile

Whether to emulate mobile device. This includes viewport meta tag, overlay scrollbars, text autosizing and more.

func (*SetDeviceMetricsOverrideRequest) OffsetX

X offset to shift resulting view image by. Ignored in |fitWindow| mode. (optional)

func (*SetDeviceMetricsOverrideRequest) OffsetY

Y offset to shift resulting view image by. Ignored in |fitWindow| mode. (optional)

func (*SetDeviceMetricsOverrideRequest) PositionX

Overriding view X position on screen in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|. (optional)

func (*SetDeviceMetricsOverrideRequest) PositionY

Overriding view Y position on screen in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|. (optional)

func (*SetDeviceMetricsOverrideRequest) Scale

Scale to apply to resulting view image. Ignored in |fitWindow| mode. (optional)

func (*SetDeviceMetricsOverrideRequest) ScreenHeight

Overriding screen height value in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|. (optional)

func (*SetDeviceMetricsOverrideRequest) ScreenOrientation

Screen orientation override. (optional)

func (*SetDeviceMetricsOverrideRequest) ScreenWidth

Overriding screen width value in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|. (optional)

func (*SetDeviceMetricsOverrideRequest) Width

Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override.

type SetDeviceOrientationOverrideRequest

type SetDeviceOrientationOverrideRequest struct {
	// contains filtered or unexported fields
}

func (*SetDeviceOrientationOverrideRequest) Alpha

Mock alpha

func (*SetDeviceOrientationOverrideRequest) Beta

Mock beta

func (*SetDeviceOrientationOverrideRequest) Do

func (*SetDeviceOrientationOverrideRequest) Gamma

Mock gamma

type SetDocumentContentRequest

type SetDocumentContentRequest struct {
	// contains filtered or unexported fields
}

func (*SetDocumentContentRequest) Do

func (*SetDocumentContentRequest) FrameId

Frame id to set HTML for.

func (*SetDocumentContentRequest) Html

HTML content to set.

type SetGeolocationOverrideRequest

type SetGeolocationOverrideRequest struct {
	// contains filtered or unexported fields
}

func (*SetGeolocationOverrideRequest) Accuracy

Mock accuracy (optional)

func (*SetGeolocationOverrideRequest) Do

func (*SetGeolocationOverrideRequest) Latitude

Mock latitude (optional)

func (*SetGeolocationOverrideRequest) Longitude

Mock longitude (optional)

type SetTouchEmulationEnabledRequest

type SetTouchEmulationEnabledRequest struct {
	// contains filtered or unexported fields
}

func (*SetTouchEmulationEnabledRequest) Configuration

Touch/gesture events configuration. Default: current platform. (optional)

func (*SetTouchEmulationEnabledRequest) Do

func (*SetTouchEmulationEnabledRequest) Enabled

Whether the touch event emulation should be enabled.

type StartScreencastRequest

type StartScreencastRequest struct {
	// contains filtered or unexported fields
}

func (*StartScreencastRequest) Do

func (r *StartScreencastRequest) Do() error

func (*StartScreencastRequest) EveryNthFrame

func (r *StartScreencastRequest) EveryNthFrame(v int) *StartScreencastRequest

Send every n-th frame. (optional)

func (*StartScreencastRequest) Format

Image compression format. (optional)

func (*StartScreencastRequest) MaxHeight

Maximum screenshot height. (optional)

func (*StartScreencastRequest) MaxWidth

Maximum screenshot width. (optional)

func (*StartScreencastRequest) Quality

Compression quality from range [0..100]. (optional)

type StopLoadingRequest

type StopLoadingRequest struct {
	// contains filtered or unexported fields
}

func (*StopLoadingRequest) Do

func (r *StopLoadingRequest) Do() error

type StopScreencastRequest

type StopScreencastRequest struct {
	// contains filtered or unexported fields
}

func (*StopScreencastRequest) Do

func (r *StopScreencastRequest) Do() error

type TransitionType

type TransitionType string

type VisualViewport

type VisualViewport struct {
	// Horizontal offset relative to the layout viewport (CSS pixels).
	OffsetX float64 `json:"offsetX"`

	// Vertical offset relative to the layout viewport (CSS pixels).
	OffsetY float64 `json:"offsetY"`

	// Horizontal offset relative to the document (CSS pixels).
	PageX float64 `json:"pageX"`

	// Vertical offset relative to the document (CSS pixels).
	PageY float64 `json:"pageY"`

	// Width (CSS pixels), excludes scrollbar if present.
	ClientWidth float64 `json:"clientWidth"`

	// Height (CSS pixels), excludes scrollbar if present.
	ClientHeight float64 `json:"clientHeight"`

	// Scale relative to the ideal viewport (size at width=device-width).
	Scale float64 `json:"scale"`
}

Jump to

Keyboard shortcuts

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