|
- Method resolution order:
- ChromeRemoteDebugInterface
- ChromeController.Generator.Generated.ChromeRemoteDebugInterface
- ChromeController.manager_base.ChromeInterface
- ChromeController.manager_base.ChromeListenerMixin
- builtins.object
Methods defined here:
- __init__(self, binary=None, dbg_port=None, use_execution_manager=None, additional_options=[], visible_size=None, disable_page=False, disable_dom=False, disable_network=False, *args, **kwargs)
- Base chromium transport initialization.
The binary to execute is assumed to be named `chromium`, and on $PATH
if not specified in the `binary` parameter.
The chromium binary is launched with the arg `--remote-debugging-port={dbg_port}` if found.
Note that the dbg_port must be GLOBALLY unique on a PER-COMPUTER basis. If not specified, it
will default to an unused port >= 9222.
Duplication of the dbg_port parameter can often lead to cr_exceptions.ChromeStartupException
exceptions. If these happen, you may need to call ChromeInterface.close() to force shutdown
of chromium instances, if you are not trying to instantiate multiple instances of chromium
at once.
All arguments that are not explicitly handled by ChromeInterface() are forwarded to the
underlying ChromeExecutionManager() instace. This is how you can control the behaviour
of the execution manager, including things like whether chromium is run in headless
mode, etc...
- blocking_navigate(self, url, timeout=10)
- Do a blocking navigate to url `url`.
This function triggers a navigation, and then waits for the browser
to claim the page has finished loading.
Roughly, this corresponds to the javascript `DOMContentLoaded` event,
meaning the dom for the page is ready.
Internals:
A navigation command results in a sequence of events:
- Page.frameStartedLoading" (with frameid)
- Page.frameStoppedLoading" (with frameid)
- Page.loadEventFired" (not attached to an ID)
Therefore, this call triggers a navigation option,
and then waits for the expected set of response event messages.
- blocking_navigate_and_get_source(self, url, timeout=10)
- Do a blocking navigate to url `url`, and then extract the
response body and return that.
This effectively returns the *unrendered* page content that's sent over the wire. As such,
if the page does any modification of the contained markup during rendering (via javascript), this
function will not reflect the changes made by the javascript.
The rendered page content can be retreived by calling `get_rendered_page_source()`.
Due to the remote api structure, accessing the raw content after the content has been loaded
is not possible, so any task requiring the raw content must be careful to request it
before it actually navigates to said content.
Return value is a dictionary with two keys:
{
'binary' : (boolean, true if content is binary, false if not)
'content' : (string of bytestring, depending on whether `binary` is true or not)
}
- clear_cookies(self)
- At this point, this is just a thin shim around the Network_clearBrowserCookies() operation.
That function postdates the clear_cookies() call here.
- click_element(self, contains_url)
- TODO
ChromeDriver source for how to click an element:
Status ExecuteClickElement(Session* session,
WebView* web_view,
const std::string& element_id,
const base::DictionaryValue& params,
std::unique_ptr<base::Value>* value) {
std::string tag_name;
Status status = GetElementTagName(session, web_view, element_id, &tag_name);
if (status.IsError())
return status;
if (tag_name == "option") {
bool is_toggleable;
status = IsOptionElementTogglable(
session, web_view, element_id, &is_toggleable);
if (status.IsError())
return status;
if (is_toggleable)
return ToggleOptionElement(session, web_view, element_id);
else
return SetOptionElementSelected(session, web_view, element_id, true);
} else {
WebPoint location;
status = GetElementClickableLocation(
session, web_view, element_id, &location);
if (status.IsError())
return status;
std::list<MouseEvent> events;
events.push_back(
MouseEvent(kMovedMouseEventType, kNoneMouseButton,
location.x, location.y, session->sticky_modifiers, 0));
events.push_back(
MouseEvent(kPressedMouseEventType, kLeftMouseButton,
location.x, location.y, session->sticky_modifiers, 1));
events.push_back(
MouseEvent(kReleasedMouseEventType, kLeftMouseButton,
location.x, location.y, session->sticky_modifiers, 1));
status =
web_view->DispatchMouseEvents(events, session->GetCurrentFrameId());
if (status.IsOk())
session->mouse_position = location;
return status;
}
}
- click_item_at_coords(self, x_pos, y_pos)
- Use the input api to generate a mouse click event at the specified coordinates.
Note that if this generates a navigation event, it will not wait for that navigation
to complete before returning.
- click_link_containing_url(self, url)
- TODO
- execute_javascript_function(self, script, args=None)
- Execute a javascript function in the context of the browser tab.
The passed script must be a single function definition, which will
be called via ({script}).apply(null, {args}).
- execute_javascript_statement(self, script)
- Execute a javascript string in the context of the browser tab.
This only works for simple JS statements. More complex usage should
be via execute_javascript_function().
This can also be used to interrogate the JS interpreter, as simply passing
variable names of interest will return the variable value.
- fetch_content_with_chrome(self, url)
- Fetch an arbitrary URL with chromium, and return the content.
This doesn't use JS to do a XHR fetch, so it should hopefully not depend on
the current tab's origin/cross-domain content security settings.
Instead, it directly uses the devtools Network.loadNetworkResource() and then
streams the result using IO.read().
Binary files are returnned as bytestrings, textual responses are returned in
unicode. The browser determines this, it's not controllable via the API.
- find_element(self, search)
- DOM_performSearch(self, query, includeUserAgentShadowDOM)
Python Function: DOM_performSearch
Domain: DOM
Method name: performSearch
WARNING: This function is marked 'Experimental'!
Parameters:
'query' (type: string) -> Plain text or query selector or XPath search query.
'includeUserAgentShadowDOM' (type: boolean) -> True to search in user agent shadow DOM.
Returns:
'searchId' (type: string) -> Unique search session identifier.
'resultCount' (type: integer) -> Number of search results.
Description: Searches for a given string in the DOM tree. Use <code>getSearchResults</code> to access search results or <code>cancelSearch</code> to end this search session.
Python Function: DOM_getSearchResults
Domain: DOM
Method name: getSearchResults
WARNING: This function is marked 'Experimental'!
Parameters:
'searchId' (type: string) -> Unique search session identifier.
'fromIndex' (type: integer) -> Start index of the search result to be returned.
'toIndex' (type: integer) -> End index of the search result to be returned.
Returns:
'nodeIds' (type: array) -> Ids of the search result nodes.
Description: Returns search results from given <code>fromIndex</code> to given <code>toIndex</code> from the sarch with the given identifier.
DOM_discardSearchResults(self, searchId)
Python Function: DOM_discardSearchResults
Domain: DOM
Method name: discardSearchResults
WARNING: This function is marked 'Experimental'!
Parameters:
'searchId' (type: string) -> Unique search session identifier.
No return value.
Description: Discards search results from the session with the given id. <code>getSearchResults</code> should no longer be called for that search.
- get_cookies(self)
- Retreive the cookies from the remote browser.
Return value is a list of http.cookiejar.Cookie() instances.
These can be directly used with the various http.cookiejar.XXXCookieJar
cookie management classes.
- get_current_url(self)
- Probe the remote session for the current window URL.
This is primarily used to do things like unwrap redirects,
or circumvent outbound url wrappers.
- get_dom_item_center_coords(self, dom_object_id)
- Given a DOM object ID, scroll it into view (if needed), and
return it's center point coordinates.
- get_dom_root_id(self)
- Get the NodeID for the DOM Root.
This assumes the page has fully loaded.
- get_page_url_title(self)
- Get the title and current url from the remote session.
Return is a 2-tuple: (page_title, page_url).
- get_rendered_page_source(self, dom_idle_requirement_secs=3, max_wait_timeout=30)
- Get the HTML markup for the current page.
This is done by looking up the root DOM node, and then requesting the outer HTML
for that node ID.
This calls return will reflect any modifications made by javascript to the
page. For unmodified content, use `blocking_navigate_and_get_source()`
dom_idle_requirement_secs specifies the period of time for which there must have been no
DOM modifications before treating the rendered output as "final". This call will therefore block for
at least dom_idle_requirement_secs seconds.
- get_unpacked_response_body(self, requestId, mimetype='application/unknown')
- Return a unpacked, decoded resposne body from Network_getResponseBody()
- handle_page_location_changed(self, timeout=None)
- If the chrome tab has internally redirected (generally because jerberscript), this
will walk the page navigation responses and attempt to fetch the response body for
the tab's latest location.
- install_evasions(self)
- Load headless detection evasions from the puppeteer-extra repository (
https://github.com/berstend/puppeteer-extra/tree/master/packages/puppeteer-extra-plugin-stealth/evasions).
- navigate_to(self, url)
- Trigger a page navigation to url `url`.
Note that this is done via javascript injection, and as such results in
the `referer` header being sent with the url of the network location.
This is useful when a page's navigation is stateful, or for simple
cases of referrer spoofing.
- new_tab(self, *args, **kwargs)
- scroll_page(self, scroll_y_delta, scroll_x_delta=0, mouse_pos_x=10, mouse_pos_y=10)
- Inject a synthezised mouse scroll event into the page.
Positive Y scroll means "down" on the page. The mouse position is where the
virtual mouse pointer is placed when it emits the scroll event.
Note that this returns immediately, and the browser takes a short period of time
to actually perform the scroll (and for any onscroll() events to be triggered.)
Additionally, scroll events are delta relatve to the current viewport. Repeated
calls with the same scroll delta will incrementally move the viewport in the
chosen direction.
- set_cookie(self, cookie)
- Add a cookie to the remote chromium instance.
Passed value `cookie` must be an instance of `http.cookiejar.Cookie()`.
- take_screeshot(self)
- Take a screenshot of the virtual viewport content.
Return value is a png image as a bytestring.
- update_headers(self, header_args)
- Given a set of headers, update both the user-agent
and additional headers for the remote browser.
header_args must be a dict. Keys are the names of
the corresponding HTTP header.
return value is a 2-tuple of the results of the user-agent
update, as well as the extra headers update.
If no 'User-Agent' key is present in the new headers,
the first item in the tuple will be None
- wait_for_dom_idle(self, dom_idle_requirement_secs=3, max_wait_timeout=30)
- Wait for the DOM to be idle.
This does some guesses about what it means for the DOM to genuinly be idle,
but it should (generally) work.
It will wait until the there have been none of the following events for `dom_idle_requirement_secs`
seconds. Note that these are events from the chromium dev tool protocol, and how they map to
actual javascripts events is defined by that.
- "Page.frameResized",
- "Page.frameStartedLoading",
- "Page.frameNavigated",
- "Page.frameAttached",
- "Page.frameStoppedLoading",
- "Page.frameScheduledNavigation",
- "Page.domContentEventFired",
- "Page.frameClearedScheduledNavigation",
- "Page.loadEventFired",
- "DOM.documentUpdated",
- "DOM.childNodeInserted",
- "DOM.childNodeRemoved",
- "DOM.childNodeCountUpdated",
If the DOM is never idle for `max_wait_timeout` seconds, it will give up and return early.
Note that due to how this works, it will ALWAYS take at least `dom_idle_requirement_secs` seconds
to return.
- xhr_fetch(self, url, headers=None, post_data=None, post_type=None)
- Execute a XMLHttpRequest() for content at `url`. If
`headers` are specified, they must be a dict of string:string
keader:values. post_data must also be pre-encoded.
Note that this will be affected by the same-origin policy of the current
page, so it can fail if you are requesting content from another domain and
the current site has restrictive same-origin policies (which is very common).
Methods inherited from ChromeController.Generator.Generated.ChromeRemoteDebugInterface:
- Accessibility_disable(self)
- Function path: Accessibility.disable
Domain: Accessibility
Method name: disable
No return value.
Description: Disables the accessibility domain.
- Accessibility_enable(self)
- Function path: Accessibility.enable
Domain: Accessibility
Method name: enable
No return value.
Description: Enables the accessibility domain which causes `AXNodeId`s to remain consistent between method calls.
This turns on accessibility for the page, which can impact performance until accessibility is disabled.
- Accessibility_getChildAXNodes(self, id)
- Function path: Accessibility.getChildAXNodes
Domain: Accessibility
Method name: getChildAXNodes
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'id' (type: AXNodeId) -> No description
Returns:
'nodes' (type: array) -> No description
Description: Fetches a particular accessibility node by AXNodeId.
Requires `enable()` to have been called previously.
- Accessibility_getFullAXTree(self, **kwargs)
- Function path: Accessibility.getFullAXTree
Domain: Accessibility
Method name: getFullAXTree
WARNING: This function is marked 'Experimental'!
Parameters:
Optional arguments:
'max_depth' (type: integer) -> The maximum depth at which descendants of the root node should be retrieved.
If omitted, the full tree is returned.
Returns:
'nodes' (type: array) -> No description
Description: Fetches the entire accessibility tree for the root Document
- Accessibility_getPartialAXTree(self, **kwargs)
- Function path: Accessibility.getPartialAXTree
Domain: Accessibility
Method name: getPartialAXTree
WARNING: This function is marked 'Experimental'!
Parameters:
Optional arguments:
'nodeId' (type: DOM.NodeId) -> Identifier of the node to get the partial accessibility tree for.
'backendNodeId' (type: DOM.BackendNodeId) -> Identifier of the backend node to get the partial accessibility tree for.
'objectId' (type: Runtime.RemoteObjectId) -> JavaScript object id of the node wrapper to get the partial accessibility tree for.
'fetchRelatives' (type: boolean) -> Whether to fetch this nodes ancestors, siblings and children. Defaults to true.
Returns:
'nodes' (type: array) -> The `Accessibility.AXNode` for this DOM node, if it exists, plus its ancestors, siblings and
children, if requested.
Description: Fetches the accessibility node and partial accessibility tree for this DOM node, if it exists.
- Accessibility_queryAXTree(self, **kwargs)
- Function path: Accessibility.queryAXTree
Domain: Accessibility
Method name: queryAXTree
WARNING: This function is marked 'Experimental'!
Parameters:
Optional arguments:
'nodeId' (type: DOM.NodeId) -> Identifier of the node for the root to query.
'backendNodeId' (type: DOM.BackendNodeId) -> Identifier of the backend node for the root to query.
'objectId' (type: Runtime.RemoteObjectId) -> JavaScript object id of the node wrapper for the root to query.
'accessibleName' (type: string) -> Find nodes with this computed name.
'role' (type: string) -> Find nodes with this computed role.
Returns:
'nodes' (type: array) -> A list of `Accessibility.AXNode` matching the specified attributes,
including nodes that are ignored for accessibility.
Description: Query a DOM node's accessibility subtree for accessible name and role.
This command computes the name and role for all nodes in the subtree, including those that are
ignored for accessibility, and returns those that mactch the specified name and role. If no DOM
node is specified, or the DOM node does not exist, the command returns an error. If neither
`accessibleName` or `role` is specified, it returns all the accessibility nodes in the subtree.
- Animation_disable(self)
- Function path: Animation.disable
Domain: Animation
Method name: disable
No return value.
Description: Disables animation domain notifications.
- Animation_enable(self)
- Function path: Animation.enable
Domain: Animation
Method name: enable
No return value.
Description: Enables animation domain notifications.
- Animation_getCurrentTime(self, id)
- Function path: Animation.getCurrentTime
Domain: Animation
Method name: getCurrentTime
Parameters:
Required arguments:
'id' (type: string) -> Id of animation.
Returns:
'currentTime' (type: number) -> Current time of the page.
Description: Returns the current time of the an animation.
- Animation_getPlaybackRate(self)
- Function path: Animation.getPlaybackRate
Domain: Animation
Method name: getPlaybackRate
Returns:
'playbackRate' (type: number) -> Playback rate for animations on page.
Description: Gets the playback rate of the document timeline.
- Animation_releaseAnimations(self, animations)
- Function path: Animation.releaseAnimations
Domain: Animation
Method name: releaseAnimations
Parameters:
Required arguments:
'animations' (type: array) -> List of animation ids to seek.
No return value.
Description: Releases a set of animations to no longer be manipulated.
- Animation_resolveAnimation(self, animationId)
- Function path: Animation.resolveAnimation
Domain: Animation
Method name: resolveAnimation
Parameters:
Required arguments:
'animationId' (type: string) -> Animation id.
Returns:
'remoteObject' (type: Runtime.RemoteObject) -> Corresponding remote object.
Description: Gets the remote object of the Animation.
- Animation_seekAnimations(self, animations, currentTime)
- Function path: Animation.seekAnimations
Domain: Animation
Method name: seekAnimations
Parameters:
Required arguments:
'animations' (type: array) -> List of animation ids to seek.
'currentTime' (type: number) -> Set the current time of each animation.
No return value.
Description: Seek a set of animations to a particular time within each animation.
- Animation_setPaused(self, animations, paused)
- Function path: Animation.setPaused
Domain: Animation
Method name: setPaused
Parameters:
Required arguments:
'animations' (type: array) -> Animations to set the pause state of.
'paused' (type: boolean) -> Paused state to set to.
No return value.
Description: Sets the paused state of a set of animations.
- Animation_setPlaybackRate(self, playbackRate)
- Function path: Animation.setPlaybackRate
Domain: Animation
Method name: setPlaybackRate
Parameters:
Required arguments:
'playbackRate' (type: number) -> Playback rate for animations on page
No return value.
Description: Sets the playback rate of the document timeline.
- Animation_setTiming(self, animationId, duration, delay)
- Function path: Animation.setTiming
Domain: Animation
Method name: setTiming
Parameters:
Required arguments:
'animationId' (type: string) -> Animation id.
'duration' (type: number) -> Duration of the animation.
'delay' (type: number) -> Delay of the animation.
No return value.
Description: Sets the timing of an animation node.
- ApplicationCache_enable(self)
- Function path: ApplicationCache.enable
Domain: ApplicationCache
Method name: enable
No return value.
Description: Enables application cache domain notifications.
- ApplicationCache_getApplicationCacheForFrame(self, frameId)
- Function path: ApplicationCache.getApplicationCacheForFrame
Domain: ApplicationCache
Method name: getApplicationCacheForFrame
Parameters:
Required arguments:
'frameId' (type: Page.FrameId) -> Identifier of the frame containing document whose application cache is retrieved.
Returns:
'applicationCache' (type: ApplicationCache) -> Relevant application cache data for the document in given frame.
Description: Returns relevant application cache data for the document in given frame.
- ApplicationCache_getFramesWithManifests(self)
- Function path: ApplicationCache.getFramesWithManifests
Domain: ApplicationCache
Method name: getFramesWithManifests
Returns:
'frameIds' (type: array) -> Array of frame identifiers with manifest urls for each frame containing a document
associated with some application cache.
Description: Returns array of frame identifiers with manifest urls for each frame containing a document
associated with some application cache.
- ApplicationCache_getManifestForFrame(self, frameId)
- Function path: ApplicationCache.getManifestForFrame
Domain: ApplicationCache
Method name: getManifestForFrame
Parameters:
Required arguments:
'frameId' (type: Page.FrameId) -> Identifier of the frame containing document whose manifest is retrieved.
Returns:
'manifestURL' (type: string) -> Manifest URL for document in the given frame.
Description: Returns manifest URL for document in the given frame.
- Audits_checkContrast(self, **kwargs)
- Function path: Audits.checkContrast
Domain: Audits
Method name: checkContrast
Parameters:
Optional arguments:
'reportAAA' (type: boolean) -> Whether to report WCAG AAA level issues. Default is false.
No return value.
Description: Runs the contrast check for the target page. Found issues are reported
using Audits.issueAdded event.
- Audits_disable(self)
- Function path: Audits.disable
Domain: Audits
Method name: disable
No return value.
Description: Disables issues domain, prevents further issues from being reported to the client.
- Audits_enable(self)
- Function path: Audits.enable
Domain: Audits
Method name: enable
No return value.
Description: Enables issues domain, sends the issues collected so far to the client by means of the
`issueAdded` event.
- Audits_getEncodedResponse(self, requestId, encoding, **kwargs)
- Function path: Audits.getEncodedResponse
Domain: Audits
Method name: getEncodedResponse
Parameters:
Required arguments:
'requestId' (type: Network.RequestId) -> Identifier of the network request to get content for.
'encoding' (type: string) -> The encoding to use.
Optional arguments:
'quality' (type: number) -> The quality of the encoding (0-1). (defaults to 1)
'sizeOnly' (type: boolean) -> Whether to only return the size information (defaults to false).
Returns:
'body' (type: string) -> The encoded body as a base64 string. Omitted if sizeOnly is true. (Encoded as a base64 string when passed over JSON)
'originalSize' (type: integer) -> Size before re-encoding.
'encodedSize' (type: integer) -> Size after re-encoding.
Description: Returns the response body and size if it were re-encoded with the specified settings. Only
applies to images.
- BackgroundService_clearEvents(self, service)
- Function path: BackgroundService.clearEvents
Domain: BackgroundService
Method name: clearEvents
Parameters:
Required arguments:
'service' (type: ServiceName) -> No description
No return value.
Description: Clears all stored data for the service.
- BackgroundService_setRecording(self, shouldRecord, service)
- Function path: BackgroundService.setRecording
Domain: BackgroundService
Method name: setRecording
Parameters:
Required arguments:
'shouldRecord' (type: boolean) -> No description
'service' (type: ServiceName) -> No description
No return value.
Description: Set the recording state for the service.
- BackgroundService_startObserving(self, service)
- Function path: BackgroundService.startObserving
Domain: BackgroundService
Method name: startObserving
Parameters:
Required arguments:
'service' (type: ServiceName) -> No description
No return value.
Description: Enables event updates for the service.
- BackgroundService_stopObserving(self, service)
- Function path: BackgroundService.stopObserving
Domain: BackgroundService
Method name: stopObserving
Parameters:
Required arguments:
'service' (type: ServiceName) -> No description
No return value.
Description: Disables event updates for the service.
- Browser_cancelDownload(self, guid, **kwargs)
- Function path: Browser.cancelDownload
Domain: Browser
Method name: cancelDownload
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'guid' (type: string) -> Global unique identifier of the download.
Optional arguments:
'browserContextId' (type: BrowserContextID) -> BrowserContext to perform the action in. When omitted, default browser context is used.
No return value.
Description: Cancel a download if in progress
- Browser_close(self)
- Function path: Browser.close
Domain: Browser
Method name: close
No return value.
Description: Close browser gracefully.
- Browser_crash(self)
- Function path: Browser.crash
Domain: Browser
Method name: crash
WARNING: This function is marked 'Experimental'!
No return value.
Description: Crashes browser on the main thread.
- Browser_crashGpuProcess(self)
- Function path: Browser.crashGpuProcess
Domain: Browser
Method name: crashGpuProcess
WARNING: This function is marked 'Experimental'!
No return value.
Description: Crashes GPU process.
- Browser_executeBrowserCommand(self, commandId)
- Function path: Browser.executeBrowserCommand
Domain: Browser
Method name: executeBrowserCommand
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'commandId' (type: BrowserCommandId) -> No description
No return value.
Description: Invoke custom browser commands used by telemetry.
- Browser_getBrowserCommandLine(self)
- Function path: Browser.getBrowserCommandLine
Domain: Browser
Method name: getBrowserCommandLine
WARNING: This function is marked 'Experimental'!
Returns:
'arguments' (type: array) -> Commandline parameters
Description: Returns the command line switches for the browser process if, and only if
--enable-automation is on the commandline.
- Browser_getHistogram(self, name, **kwargs)
- Function path: Browser.getHistogram
Domain: Browser
Method name: getHistogram
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'name' (type: string) -> Requested histogram name.
Optional arguments:
'delta' (type: boolean) -> If true, retrieve delta since last call.
Returns:
'histogram' (type: Histogram) -> Histogram.
Description: Get a Chrome histogram by name.
- Browser_getHistograms(self, **kwargs)
- Function path: Browser.getHistograms
Domain: Browser
Method name: getHistograms
WARNING: This function is marked 'Experimental'!
Parameters:
Optional arguments:
'query' (type: string) -> Requested substring in name. Only histograms which have query as a
substring in their name are extracted. An empty or absent query returns
all histograms.
'delta' (type: boolean) -> If true, retrieve delta since last call.
Returns:
'histograms' (type: array) -> Histograms.
Description: Get Chrome histograms.
- Browser_getVersion(self)
- Function path: Browser.getVersion
Domain: Browser
Method name: getVersion
Returns:
'protocolVersion' (type: string) -> Protocol version.
'product' (type: string) -> Product name.
'revision' (type: string) -> Product revision.
'userAgent' (type: string) -> User-Agent.
'jsVersion' (type: string) -> V8 version.
Description: Returns version information.
- Browser_getWindowBounds(self, windowId)
- Function path: Browser.getWindowBounds
Domain: Browser
Method name: getWindowBounds
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'windowId' (type: WindowID) -> Browser window id.
Returns:
'bounds' (type: Bounds) -> Bounds information of the window. When window state is 'minimized', the restored window
position and size are returned.
Description: Get position and size of the browser window.
- Browser_getWindowForTarget(self, **kwargs)
- Function path: Browser.getWindowForTarget
Domain: Browser
Method name: getWindowForTarget
WARNING: This function is marked 'Experimental'!
Parameters:
Optional arguments:
'targetId' (type: Target.TargetID) -> Devtools agent host id. If called as a part of the session, associated targetId is used.
Returns:
'windowId' (type: WindowID) -> Browser window id.
'bounds' (type: Bounds) -> Bounds information of the window. When window state is 'minimized', the restored window
position and size are returned.
Description: Get the browser window that contains the devtools target.
- Browser_grantPermissions(self, permissions, **kwargs)
- Function path: Browser.grantPermissions
Domain: Browser
Method name: grantPermissions
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'permissions' (type: array) -> No description
Optional arguments:
'origin' (type: string) -> Origin the permission applies to, all origins if not specified.
'browserContextId' (type: BrowserContextID) -> BrowserContext to override permissions. When omitted, default browser context is used.
No return value.
Description: Grant specific permissions to the given origin and reject all others.
- Browser_resetPermissions(self, **kwargs)
- Function path: Browser.resetPermissions
Domain: Browser
Method name: resetPermissions
WARNING: This function is marked 'Experimental'!
Parameters:
Optional arguments:
'browserContextId' (type: BrowserContextID) -> BrowserContext to reset permissions. When omitted, default browser context is used.
No return value.
Description: Reset all permission management for all origins.
- Browser_setDockTile(self, **kwargs)
- Function path: Browser.setDockTile
Domain: Browser
Method name: setDockTile
WARNING: This function is marked 'Experimental'!
Parameters:
Optional arguments:
'badgeLabel' (type: string) -> No description
'image' (type: string) -> Png encoded image. (Encoded as a base64 string when passed over JSON)
No return value.
Description: Set dock tile details, platform-specific.
- Browser_setDownloadBehavior(self, behavior, **kwargs)
- Function path: Browser.setDownloadBehavior
Domain: Browser
Method name: setDownloadBehavior
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'behavior' (type: string) -> Whether to allow all or deny all download requests, or use default Chrome behavior if
available (otherwise deny). |allowAndName| allows download and names files according to
their dowmload guids.
Optional arguments:
'browserContextId' (type: BrowserContextID) -> BrowserContext to set download behavior. When omitted, default browser context is used.
'downloadPath' (type: string) -> The default path to save downloaded files to. This is required if behavior is set to 'allow'
or 'allowAndName'.
'eventsEnabled' (type: boolean) -> Whether to emit download events (defaults to false).
No return value.
Description: Set the behavior when downloading a file.
- Browser_setPermission(self, permission, setting, **kwargs)
- Function path: Browser.setPermission
Domain: Browser
Method name: setPermission
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'permission' (type: PermissionDescriptor) -> Descriptor of permission to override.
'setting' (type: PermissionSetting) -> Setting of the permission.
Optional arguments:
'origin' (type: string) -> Origin the permission applies to, all origins if not specified.
'browserContextId' (type: BrowserContextID) -> Context to override. When omitted, default browser context is used.
No return value.
Description: Set permission settings for given origin.
- Browser_setWindowBounds(self, windowId, bounds)
- Function path: Browser.setWindowBounds
Domain: Browser
Method name: setWindowBounds
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'windowId' (type: WindowID) -> Browser window id.
'bounds' (type: Bounds) -> New window bounds. The 'minimized', 'maximized' and 'fullscreen' states cannot be combined
with 'left', 'top', 'width' or 'height'. Leaves unspecified fields unchanged.
No return value.
Description: Set position and/or size of the browser window.
- CSS_addRule(self, styleSheetId, ruleText, location)
- Function path: CSS.addRule
Domain: CSS
Method name: addRule
Parameters:
Required arguments:
'styleSheetId' (type: StyleSheetId) -> The css style sheet identifier where a new rule should be inserted.
'ruleText' (type: string) -> The text of a new rule.
'location' (type: SourceRange) -> Text position of a new rule in the target style sheet.
Returns:
'rule' (type: CSSRule) -> The newly created rule.
Description: Inserts a new rule with the given `ruleText` in a stylesheet with given `styleSheetId`, at the
position specified by `location`.
- CSS_collectClassNames(self, styleSheetId)
- Function path: CSS.collectClassNames
Domain: CSS
Method name: collectClassNames
Parameters:
Required arguments:
'styleSheetId' (type: StyleSheetId) -> No description
Returns:
'classNames' (type: array) -> Class name list.
Description: Returns all class names from specified stylesheet.
- CSS_createStyleSheet(self, frameId)
- Function path: CSS.createStyleSheet
Domain: CSS
Method name: createStyleSheet
Parameters:
Required arguments:
'frameId' (type: Page.FrameId) -> Identifier of the frame where "via-inspector" stylesheet should be created.
Returns:
'styleSheetId' (type: StyleSheetId) -> Identifier of the created "via-inspector" stylesheet.
Description: Creates a new special "via-inspector" stylesheet in the frame with given `frameId`.
- CSS_disable(self)
- Function path: CSS.disable
Domain: CSS
Method name: disable
No return value.
Description: Disables the CSS agent for the given page.
- CSS_enable(self)
- Function path: CSS.enable
Domain: CSS
Method name: enable
No return value.
Description: Enables the CSS agent for the given page. Clients should not assume that the CSS agent has been
enabled until the result of this command is received.
- CSS_forcePseudoState(self, nodeId, forcedPseudoClasses)
- Function path: CSS.forcePseudoState
Domain: CSS
Method name: forcePseudoState
Parameters:
Required arguments:
'nodeId' (type: DOM.NodeId) -> The element id for which to force the pseudo state.
'forcedPseudoClasses' (type: array) -> Element pseudo classes to force when computing the element's style.
No return value.
Description: Ensures that the given node will have specified pseudo-classes whenever its style is computed by
the browser.
- CSS_getBackgroundColors(self, nodeId)
- Function path: CSS.getBackgroundColors
Domain: CSS
Method name: getBackgroundColors
Parameters:
Required arguments:
'nodeId' (type: DOM.NodeId) -> Id of the node to get background colors for.
Returns:
'backgroundColors' (type: array) -> The range of background colors behind this element, if it contains any visible text. If no
visible text is present, this will be undefined. In the case of a flat background color,
this will consist of simply that color. In the case of a gradient, this will consist of each
of the color stops. For anything more complicated, this will be an empty array. Images will
be ignored (as if the image had failed to load).
'computedFontSize' (type: string) -> The computed font size for this node, as a CSS computed value string (e.g. '12px').
'computedFontWeight' (type: string) -> The computed font weight for this node, as a CSS computed value string (e.g. 'normal' or
'100').
- CSS_getComputedStyleForNode(self, nodeId)
- Function path: CSS.getComputedStyleForNode
Domain: CSS
Method name: getComputedStyleForNode
Parameters:
Required arguments:
'nodeId' (type: DOM.NodeId) -> No description
Returns:
'computedStyle' (type: array) -> Computed style for the specified DOM node.
Description: Returns the computed style for a DOM node identified by `nodeId`.
- CSS_getInlineStylesForNode(self, nodeId)
- Function path: CSS.getInlineStylesForNode
Domain: CSS
Method name: getInlineStylesForNode
Parameters:
Required arguments:
'nodeId' (type: DOM.NodeId) -> No description
Returns:
'inlineStyle' (type: CSSStyle) -> Inline style for the specified DOM node.
'attributesStyle' (type: CSSStyle) -> Attribute-defined element style (e.g. resulting from "width=20 height=100%").
Description: Returns the styles defined inline (explicitly in the "style" attribute and implicitly, using DOM
attributes) for a DOM node identified by `nodeId`.
- CSS_getMatchedStylesForNode(self, nodeId)
- Function path: CSS.getMatchedStylesForNode
Domain: CSS
Method name: getMatchedStylesForNode
Parameters:
Required arguments:
'nodeId' (type: DOM.NodeId) -> No description
Returns:
'inlineStyle' (type: CSSStyle) -> Inline style for the specified DOM node.
'attributesStyle' (type: CSSStyle) -> Attribute-defined element style (e.g. resulting from "width=20 height=100%").
'matchedCSSRules' (type: array) -> CSS rules matching this node, from all applicable stylesheets.
'pseudoElements' (type: array) -> Pseudo style matches for this node.
'inherited' (type: array) -> A chain of inherited styles (from the immediate node parent up to the DOM tree root).
'cssKeyframesRules' (type: array) -> A list of CSS keyframed animations matching this node.
Description: Returns requested styles for a DOM node identified by `nodeId`.
- CSS_getMediaQueries(self)
- Function path: CSS.getMediaQueries
Domain: CSS
Method name: getMediaQueries
Returns:
'medias' (type: array) -> No description
Description: Returns all media queries parsed by the rendering engine.
- CSS_getPlatformFontsForNode(self, nodeId)
- Function path: CSS.getPlatformFontsForNode
Domain: CSS
Method name: getPlatformFontsForNode
Parameters:
Required arguments:
'nodeId' (type: DOM.NodeId) -> No description
Returns:
'fonts' (type: array) -> Usage statistics for every employed platform font.
Description: Requests information about platform fonts which we used to render child TextNodes in the given
node.
- CSS_getStyleSheetText(self, styleSheetId)
- Function path: CSS.getStyleSheetText
Domain: CSS
Method name: getStyleSheetText
Parameters:
Required arguments:
'styleSheetId' (type: StyleSheetId) -> No description
Returns:
'text' (type: string) -> The stylesheet text.
Description: Returns the current textual content for a stylesheet.
- CSS_setContainerQueryText(self, styleSheetId, range, text)
- Function path: CSS.setContainerQueryText
Domain: CSS
Method name: setContainerQueryText
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'styleSheetId' (type: StyleSheetId) -> No description
'range' (type: SourceRange) -> No description
'text' (type: string) -> No description
Returns:
'containerQuery' (type: CSSContainerQuery) -> The resulting CSS container query rule after modification.
Description: Modifies the expression of a container query.
- CSS_setEffectivePropertyValueForNode(self, nodeId, propertyName, value)
- Function path: CSS.setEffectivePropertyValueForNode
Domain: CSS
Method name: setEffectivePropertyValueForNode
Parameters:
Required arguments:
'nodeId' (type: DOM.NodeId) -> The element id for which to set property.
'propertyName' (type: string) -> No description
'value' (type: string) -> No description
No return value.
Description: Find a rule with the given active property for the given node and set the new value for this
property
- CSS_setKeyframeKey(self, styleSheetId, range, keyText)
- Function path: CSS.setKeyframeKey
Domain: CSS
Method name: setKeyframeKey
Parameters:
Required arguments:
'styleSheetId' (type: StyleSheetId) -> No description
'range' (type: SourceRange) -> No description
'keyText' (type: string) -> No description
Returns:
'keyText' (type: Value) -> The resulting key text after modification.
Description: Modifies the keyframe rule key text.
- CSS_setLocalFontsEnabled(self, enabled)
- Function path: CSS.setLocalFontsEnabled
Domain: CSS
Method name: setLocalFontsEnabled
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'enabled' (type: boolean) -> Whether rendering of local fonts is enabled.
No return value.
Description: Enables/disables rendering of local CSS fonts (enabled by default).
- CSS_setMediaText(self, styleSheetId, range, text)
- Function path: CSS.setMediaText
Domain: CSS
Method name: setMediaText
Parameters:
Required arguments:
'styleSheetId' (type: StyleSheetId) -> No description
'range' (type: SourceRange) -> No description
'text' (type: string) -> No description
Returns:
'media' (type: CSSMedia) -> The resulting CSS media rule after modification.
Description: Modifies the rule selector.
- CSS_setRuleSelector(self, styleSheetId, range, selector)
- Function path: CSS.setRuleSelector
Domain: CSS
Method name: setRuleSelector
Parameters:
Required arguments:
'styleSheetId' (type: StyleSheetId) -> No description
'range' (type: SourceRange) -> No description
'selector' (type: string) -> No description
Returns:
'selectorList' (type: SelectorList) -> The resulting selector list after modification.
Description: Modifies the rule selector.
- CSS_setStyleSheetText(self, styleSheetId, text)
- Function path: CSS.setStyleSheetText
Domain: CSS
Method name: setStyleSheetText
Parameters:
Required arguments:
'styleSheetId' (type: StyleSheetId) -> No description
'text' (type: string) -> No description
Returns:
'sourceMapURL' (type: string) -> URL of source map associated with script (if any).
Description: Sets the new stylesheet text.
- CSS_setStyleTexts(self, edits)
- Function path: CSS.setStyleTexts
Domain: CSS
Method name: setStyleTexts
Parameters:
Required arguments:
'edits' (type: array) -> No description
Returns:
'styles' (type: array) -> The resulting styles after modification.
Description: Applies specified style edits one after another in the given order.
- CSS_startRuleUsageTracking(self)
- Function path: CSS.startRuleUsageTracking
Domain: CSS
Method name: startRuleUsageTracking
No return value.
Description: Enables the selector recording.
- CSS_stopRuleUsageTracking(self)
- Function path: CSS.stopRuleUsageTracking
Domain: CSS
Method name: stopRuleUsageTracking
Returns:
'ruleUsage' (type: array) -> No description
Description: Stop tracking rule usage and return the list of rules that were used since last call to
`takeCoverageDelta` (or since start of coverage instrumentation)
- CSS_takeComputedStyleUpdates(self)
- Function path: CSS.takeComputedStyleUpdates
Domain: CSS
Method name: takeComputedStyleUpdates
WARNING: This function is marked 'Experimental'!
Returns:
'nodeIds' (type: array) -> The list of node Ids that have their tracked computed styles updated
Description: Polls the next batch of computed style updates.
- CSS_takeCoverageDelta(self)
- Function path: CSS.takeCoverageDelta
Domain: CSS
Method name: takeCoverageDelta
Returns:
'coverage' (type: array) -> No description
'timestamp' (type: number) -> Monotonically increasing time, in seconds.
Description: Obtain list of rules that became used since last call to this method (or since start of coverage
instrumentation)
- CSS_trackComputedStyleUpdates(self, propertiesToTrack)
- Function path: CSS.trackComputedStyleUpdates
Domain: CSS
Method name: trackComputedStyleUpdates
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'propertiesToTrack' (type: array) -> No description
No return value.
Description: Starts tracking the given computed styles for updates. The specified array of properties
replaces the one previously specified. Pass empty array to disable tracking.
Use takeComputedStyleUpdates to retrieve the list of nodes that had properties modified.
The changes to computed style properties are only tracked for nodes pushed to the front-end
by the DOM agent. If no changes to the tracked properties occur after the node has been pushed
to the front-end, no updates will be issued for the node.
- CacheStorage_deleteCache(self, cacheId)
- Function path: CacheStorage.deleteCache
Domain: CacheStorage
Method name: deleteCache
Parameters:
Required arguments:
'cacheId' (type: CacheId) -> Id of cache for deletion.
No return value.
Description: Deletes a cache.
- CacheStorage_deleteEntry(self, cacheId, request)
- Function path: CacheStorage.deleteEntry
Domain: CacheStorage
Method name: deleteEntry
Parameters:
Required arguments:
'cacheId' (type: CacheId) -> Id of cache where the entry will be deleted.
'request' (type: string) -> URL spec of the request.
No return value.
Description: Deletes a cache entry.
- CacheStorage_requestCacheNames(self, securityOrigin)
- Function path: CacheStorage.requestCacheNames
Domain: CacheStorage
Method name: requestCacheNames
Parameters:
Required arguments:
'securityOrigin' (type: string) -> Security origin.
Returns:
'caches' (type: array) -> Caches for the security origin.
Description: Requests cache names.
- CacheStorage_requestCachedResponse(self, cacheId, requestURL, requestHeaders)
- Function path: CacheStorage.requestCachedResponse
Domain: CacheStorage
Method name: requestCachedResponse
Parameters:
Required arguments:
'cacheId' (type: CacheId) -> Id of cache that contains the entry.
'requestURL' (type: string) -> URL spec of the request.
'requestHeaders' (type: array) -> headers of the request.
Returns:
'response' (type: CachedResponse) -> Response read from the cache.
Description: Fetches cache entry.
- CacheStorage_requestEntries(self, cacheId, **kwargs)
- Function path: CacheStorage.requestEntries
Domain: CacheStorage
Method name: requestEntries
Parameters:
Required arguments:
'cacheId' (type: CacheId) -> ID of cache to get entries from.
Optional arguments:
'skipCount' (type: integer) -> Number of records to skip.
'pageSize' (type: integer) -> Number of records to fetch.
'pathFilter' (type: string) -> If present, only return the entries containing this substring in the path
Returns:
'cacheDataEntries' (type: array) -> Array of object store data entries.
'returnCount' (type: number) -> Count of returned entries from this storage. If pathFilter is empty, it
is the count of all entries from this storage.
Description: Requests data from cache.
- Cast_disable(self)
- Function path: Cast.disable
Domain: Cast
Method name: disable
No return value.
Description: Stops observing for sinks and issues.
- Cast_enable(self, **kwargs)
- Function path: Cast.enable
Domain: Cast
Method name: enable
Parameters:
Optional arguments:
'presentationUrl' (type: string) -> No description
No return value.
Description: Starts observing for sinks that can be used for tab mirroring, and if set,
sinks compatible with |presentationUrl| as well. When sinks are found, a
|sinksUpdated| event is fired.
Also starts observing for issue messages. When an issue is added or removed,
an |issueUpdated| event is fired.
- Cast_setSinkToUse(self, sinkName)
- Function path: Cast.setSinkToUse
Domain: Cast
Method name: setSinkToUse
Parameters:
Required arguments:
'sinkName' (type: string) -> No description
No return value.
Description: Sets a sink to be used when the web page requests the browser to choose a
sink via Presentation API, Remote Playback API, or Cast SDK.
- Cast_startTabMirroring(self, sinkName)
- Function path: Cast.startTabMirroring
Domain: Cast
Method name: startTabMirroring
Parameters:
Required arguments:
'sinkName' (type: string) -> No description
No return value.
Description: Starts mirroring the tab to the sink.
- Cast_stopCasting(self, sinkName)
- Function path: Cast.stopCasting
Domain: Cast
Method name: stopCasting
Parameters:
Required arguments:
'sinkName' (type: string) -> No description
No return value.
Description: Stops the active Cast session on the sink.
- Console_clearMessages(self)
- Function path: Console.clearMessages
Domain: Console
Method name: clearMessages
No return value.
Description: Does nothing.
- Console_disable(self)
- Function path: Console.disable
Domain: Console
Method name: disable
No return value.
Description: Disables console domain, prevents further console messages from being reported to the client.
- Console_enable(self)
- Function path: Console.enable
Domain: Console
Method name: enable
No return value.
Description: Enables console domain, sends the messages collected so far to the client by means of the
`messageAdded` notification.
- DOMDebugger_getEventListeners(self, objectId, **kwargs)
- Function path: DOMDebugger.getEventListeners
Domain: DOMDebugger
Method name: getEventListeners
Parameters:
Required arguments:
'objectId' (type: Runtime.RemoteObjectId) -> Identifier of the object to return listeners for.
Optional arguments:
'depth' (type: integer) -> The maximum depth at which Node children should be retrieved, defaults to 1. Use -1 for the
entire subtree or provide an integer larger than 0.
'pierce' (type: boolean) -> Whether or not iframes and shadow roots should be traversed when returning the subtree
(default is false). Reports listeners for all contexts if pierce is enabled.
Returns:
'listeners' (type: array) -> Array of relevant listeners.
Description: Returns event listeners of the given object.
- DOMDebugger_removeDOMBreakpoint(self, nodeId, type)
- Function path: DOMDebugger.removeDOMBreakpoint
Domain: DOMDebugger
Method name: removeDOMBreakpoint
Parameters:
Required arguments:
'nodeId' (type: DOM.NodeId) -> Identifier of the node to remove breakpoint from.
'type' (type: DOMBreakpointType) -> Type of the breakpoint to remove.
No return value.
Description: Removes DOM breakpoint that was set using `setDOMBreakpoint`.
- DOMDebugger_removeEventListenerBreakpoint(self, eventName, **kwargs)
- Function path: DOMDebugger.removeEventListenerBreakpoint
Domain: DOMDebugger
Method name: removeEventListenerBreakpoint
Parameters:
Required arguments:
'eventName' (type: string) -> Event name.
Optional arguments:
'targetName' (type: string) -> EventTarget interface name.
No return value.
Description: Removes breakpoint on particular DOM event.
- DOMDebugger_removeInstrumentationBreakpoint(self, eventName)
- Function path: DOMDebugger.removeInstrumentationBreakpoint
Domain: DOMDebugger
Method name: removeInstrumentationBreakpoint
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'eventName' (type: string) -> Instrumentation name to stop on.
No return value.
Description: Removes breakpoint on particular native event.
- DOMDebugger_removeXHRBreakpoint(self, url)
- Function path: DOMDebugger.removeXHRBreakpoint
Domain: DOMDebugger
Method name: removeXHRBreakpoint
Parameters:
Required arguments:
'url' (type: string) -> Resource URL substring.
No return value.
Description: Removes breakpoint from XMLHttpRequest.
- DOMDebugger_setBreakOnCSPViolation(self, violationTypes)
- Function path: DOMDebugger.setBreakOnCSPViolation
Domain: DOMDebugger
Method name: setBreakOnCSPViolation
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'violationTypes' (type: array) -> CSP Violations to stop upon.
No return value.
Description: Sets breakpoint on particular CSP violations.
- DOMDebugger_setDOMBreakpoint(self, nodeId, type)
- Function path: DOMDebugger.setDOMBreakpoint
Domain: DOMDebugger
Method name: setDOMBreakpoint
Parameters:
Required arguments:
'nodeId' (type: DOM.NodeId) -> Identifier of the node to set breakpoint on.
'type' (type: DOMBreakpointType) -> Type of the operation to stop upon.
No return value.
Description: Sets breakpoint on particular operation with DOM.
- DOMDebugger_setEventListenerBreakpoint(self, eventName, **kwargs)
- Function path: DOMDebugger.setEventListenerBreakpoint
Domain: DOMDebugger
Method name: setEventListenerBreakpoint
Parameters:
Required arguments:
'eventName' (type: string) -> DOM Event name to stop on (any DOM event will do).
Optional arguments:
'targetName' (type: string) -> EventTarget interface name to stop on. If equal to `"*"` or not provided, will stop on any
EventTarget.
No return value.
Description: Sets breakpoint on particular DOM event.
- DOMDebugger_setInstrumentationBreakpoint(self, eventName)
- Function path: DOMDebugger.setInstrumentationBreakpoint
Domain: DOMDebugger
Method name: setInstrumentationBreakpoint
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'eventName' (type: string) -> Instrumentation name to stop on.
No return value.
Description: Sets breakpoint on particular native event.
- DOMDebugger_setXHRBreakpoint(self, url)
- Function path: DOMDebugger.setXHRBreakpoint
Domain: DOMDebugger
Method name: setXHRBreakpoint
Parameters:
Required arguments:
'url' (type: string) -> Resource URL substring. All XHRs having this substring in the URL will get stopped upon.
No return value.
Description: Sets breakpoint on XMLHttpRequest.
- DOMSnapshot_captureSnapshot(self, computedStyles, **kwargs)
- Function path: DOMSnapshot.captureSnapshot
Domain: DOMSnapshot
Method name: captureSnapshot
Parameters:
Required arguments:
'computedStyles' (type: array) -> Whitelist of computed styles to return.
Optional arguments:
'includePaintOrder' (type: boolean) -> Whether to include layout object paint orders into the snapshot.
'includeDOMRects' (type: boolean) -> Whether to include DOM rectangles (offsetRects, clientRects, scrollRects) into the snapshot
'includeBlendedBackgroundColors' (type: boolean) -> Whether to include blended background colors in the snapshot (default: false).
Blended background color is achieved by blending background colors of all elements
that overlap with the current element.
'includeTextColorOpacities' (type: boolean) -> Whether to include text color opacity in the snapshot (default: false).
An element might have the opacity property set that affects the text color of the element.
The final text color opacity is computed based on the opacity of all overlapping elements.
Returns:
'documents' (type: array) -> The nodes in the DOM tree. The DOMNode at index 0 corresponds to the root document.
'strings' (type: array) -> Shared string table that all string properties refer to with indexes.
Description: Returns a document snapshot, including the full DOM tree of the root node (including iframes,
template contents, and imported documents) in a flattened array, as well as layout and
white-listed computed style information for the nodes. Shadow DOM in the returned DOM tree is
flattened.
- DOMSnapshot_disable(self)
- Function path: DOMSnapshot.disable
Domain: DOMSnapshot
Method name: disable
No return value.
Description: Disables DOM snapshot agent for the given page.
- DOMSnapshot_enable(self)
- Function path: DOMSnapshot.enable
Domain: DOMSnapshot
Method name: enable
No return value.
Description: Enables DOM snapshot agent for the given page.
- DOMSnapshot_getSnapshot(self, computedStyleWhitelist, **kwargs)
- Function path: DOMSnapshot.getSnapshot
Domain: DOMSnapshot
Method name: getSnapshot
Parameters:
Required arguments:
'computedStyleWhitelist' (type: array) -> Whitelist of computed styles to return.
Optional arguments:
'includeEventListeners' (type: boolean) -> Whether or not to retrieve details of DOM listeners (default false).
'includePaintOrder' (type: boolean) -> Whether to determine and include the paint order index of LayoutTreeNodes (default false).
'includeUserAgentShadowTree' (type: boolean) -> Whether to include UA shadow tree in the snapshot (default false).
Returns:
'domNodes' (type: array) -> The nodes in the DOM tree. The DOMNode at index 0 corresponds to the root document.
'layoutTreeNodes' (type: array) -> The nodes in the layout tree.
'computedStyles' (type: array) -> Whitelisted ComputedStyle properties for each node in the layout tree.
Description: Returns a document snapshot, including the full DOM tree of the root node (including iframes,
template contents, and imported documents) in a flattened array, as well as layout and
white-listed computed style information for the nodes. Shadow DOM in the returned DOM tree is
flattened.
- DOMStorage_clear(self, storageId)
- Function path: DOMStorage.clear
Domain: DOMStorage
Method name: clear
Parameters:
Required arguments:
'storageId' (type: StorageId) -> No description
No return value.
- DOMStorage_disable(self)
- Function path: DOMStorage.disable
Domain: DOMStorage
Method name: disable
No return value.
Description: Disables storage tracking, prevents storage events from being sent to the client.
- DOMStorage_enable(self)
- Function path: DOMStorage.enable
Domain: DOMStorage
Method name: enable
No return value.
Description: Enables storage tracking, storage events will now be delivered to the client.
- DOMStorage_getDOMStorageItems(self, storageId)
- Function path: DOMStorage.getDOMStorageItems
Domain: DOMStorage
Method name: getDOMStorageItems
Parameters:
Required arguments:
'storageId' (type: StorageId) -> No description
Returns:
'entries' (type: array) -> No description
- DOMStorage_removeDOMStorageItem(self, storageId, key)
- Function path: DOMStorage.removeDOMStorageItem
Domain: DOMStorage
Method name: removeDOMStorageItem
Parameters:
Required arguments:
'storageId' (type: StorageId) -> No description
'key' (type: string) -> No description
No return value.
- DOMStorage_setDOMStorageItem(self, storageId, key, value)
- Function path: DOMStorage.setDOMStorageItem
Domain: DOMStorage
Method name: setDOMStorageItem
Parameters:
Required arguments:
'storageId' (type: StorageId) -> No description
'key' (type: string) -> No description
'value' (type: string) -> No description
No return value.
- DOM_collectClassNamesFromSubtree(self, nodeId)
- Function path: DOM.collectClassNamesFromSubtree
Domain: DOM
Method name: collectClassNamesFromSubtree
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'nodeId' (type: NodeId) -> Id of the node to collect class names.
Returns:
'classNames' (type: array) -> Class name list.
Description: Collects class names for the node with given id and all of it's child nodes.
- DOM_copyTo(self, nodeId, targetNodeId, **kwargs)
- Function path: DOM.copyTo
Domain: DOM
Method name: copyTo
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'nodeId' (type: NodeId) -> Id of the node to copy.
'targetNodeId' (type: NodeId) -> Id of the element to drop the copy into.
Optional arguments:
'insertBeforeNodeId' (type: NodeId) -> Drop the copy before this node (if absent, the copy becomes the last child of
`targetNodeId`).
Returns:
'nodeId' (type: NodeId) -> Id of the node clone.
Description: Creates a deep copy of the specified node and places it into the target container before the
given anchor.
- DOM_describeNode(self, **kwargs)
- Function path: DOM.describeNode
Domain: DOM
Method name: describeNode
Parameters:
Optional arguments:
'nodeId' (type: NodeId) -> Identifier of the node.
'backendNodeId' (type: BackendNodeId) -> Identifier of the backend node.
'objectId' (type: Runtime.RemoteObjectId) -> JavaScript object id of the node wrapper.
'depth' (type: integer) -> The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the
entire subtree or provide an integer larger than 0.
'pierce' (type: boolean) -> Whether or not iframes and shadow roots should be traversed when returning the subtree
(default is false).
Returns:
'node' (type: Node) -> Node description.
Description: Describes node given its id, does not require domain to be enabled. Does not start tracking any
objects, can be used for automation.
- DOM_disable(self)
- Function path: DOM.disable
Domain: DOM
Method name: disable
No return value.
Description: Disables DOM agent for the given page.
- DOM_discardSearchResults(self, searchId)
- Function path: DOM.discardSearchResults
Domain: DOM
Method name: discardSearchResults
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'searchId' (type: string) -> Unique search session identifier.
No return value.
Description: Discards search results from the session with the given id. `getSearchResults` should no longer
be called for that search.
- DOM_enable(self)
- Function path: DOM.enable
Domain: DOM
Method name: enable
No return value.
Description: Enables DOM agent for the given page.
- DOM_focus(self, **kwargs)
- Function path: DOM.focus
Domain: DOM
Method name: focus
Parameters:
Optional arguments:
'nodeId' (type: NodeId) -> Identifier of the node.
'backendNodeId' (type: BackendNodeId) -> Identifier of the backend node.
'objectId' (type: Runtime.RemoteObjectId) -> JavaScript object id of the node wrapper.
No return value.
Description: Focuses the given element.
- DOM_getAttributes(self, nodeId)
- Function path: DOM.getAttributes
Domain: DOM
Method name: getAttributes
Parameters:
Required arguments:
'nodeId' (type: NodeId) -> Id of the node to retrieve attibutes for.
Returns:
'attributes' (type: array) -> An interleaved array of node attribute names and values.
Description: Returns attributes for the specified node.
- DOM_getBoxModel(self, **kwargs)
- Function path: DOM.getBoxModel
Domain: DOM
Method name: getBoxModel
Parameters:
Optional arguments:
'nodeId' (type: NodeId) -> Identifier of the node.
'backendNodeId' (type: BackendNodeId) -> Identifier of the backend node.
'objectId' (type: Runtime.RemoteObjectId) -> JavaScript object id of the node wrapper.
Returns:
'model' (type: BoxModel) -> Box model for the node.
Description: Returns boxes for the given node.
- DOM_getContainerForNode(self, nodeId, **kwargs)
- Function path: DOM.getContainerForNode
Domain: DOM
Method name: getContainerForNode
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'nodeId' (type: NodeId) -> No description
Optional arguments:
'containerName' (type: string) -> No description
Returns:
'nodeId' (type: NodeId) -> The container node for the given node, or null if not found.
Description: Returns the container of the given node based on container query conditions.
If containerName is given, it will find the nearest container with a matching name;
otherwise it will find the nearest container regardless of its container name.
- DOM_getContentQuads(self, **kwargs)
- Function path: DOM.getContentQuads
Domain: DOM
Method name: getContentQuads
WARNING: This function is marked 'Experimental'!
Parameters:
Optional arguments:
'nodeId' (type: NodeId) -> Identifier of the node.
'backendNodeId' (type: BackendNodeId) -> Identifier of the backend node.
'objectId' (type: Runtime.RemoteObjectId) -> JavaScript object id of the node wrapper.
Returns:
'quads' (type: array) -> Quads that describe node layout relative to viewport.
Description: Returns quads that describe node position on the page. This method
might return multiple quads for inline nodes.
- DOM_getDocument(self, **kwargs)
- Function path: DOM.getDocument
Domain: DOM
Method name: getDocument
Parameters:
Optional arguments:
'depth' (type: integer) -> The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the
entire subtree or provide an integer larger than 0.
'pierce' (type: boolean) -> Whether or not iframes and shadow roots should be traversed when returning the subtree
(default is false).
Returns:
'root' (type: Node) -> Resulting node.
Description: Returns the root DOM node (and optionally the subtree) to the caller.
- DOM_getFileInfo(self, objectId)
- Function path: DOM.getFileInfo
Domain: DOM
Method name: getFileInfo
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'objectId' (type: Runtime.RemoteObjectId) -> JavaScript object id of the node wrapper.
Returns:
'path' (type: string) -> No description
Description: Returns file information for the given
File wrapper.
- DOM_getFlattenedDocument(self, **kwargs)
- Function path: DOM.getFlattenedDocument
Domain: DOM
Method name: getFlattenedDocument
Parameters:
Optional arguments:
'depth' (type: integer) -> The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the
entire subtree or provide an integer larger than 0.
'pierce' (type: boolean) -> Whether or not iframes and shadow roots should be traversed when returning the subtree
(default is false).
Returns:
'nodes' (type: array) -> Resulting node.
Description: Returns the root DOM node (and optionally the subtree) to the caller.
Deprecated, as it is not designed to work well with the rest of the DOM agent.
Use DOMSnapshot.captureSnapshot instead.
- DOM_getFrameOwner(self, frameId)
- Function path: DOM.getFrameOwner
Domain: DOM
Method name: getFrameOwner
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'frameId' (type: Page.FrameId) -> No description
Returns:
'backendNodeId' (type: BackendNodeId) -> Resulting node.
'nodeId' (type: NodeId) -> Id of the node at given coordinates, only when enabled and requested document.
Description: Returns iframe node that owns iframe with the given domain.
- DOM_getNodeForLocation(self, x, y, **kwargs)
- Function path: DOM.getNodeForLocation
Domain: DOM
Method name: getNodeForLocation
Parameters:
Required arguments:
'x' (type: integer) -> X coordinate.
'y' (type: integer) -> Y coordinate.
Optional arguments:
'includeUserAgentShadowDOM' (type: boolean) -> False to skip to the nearest non-UA shadow root ancestor (default: false).
'ignorePointerEventsNone' (type: boolean) -> Whether to ignore pointer-events: none on elements and hit test them.
Returns:
'backendNodeId' (type: BackendNodeId) -> Resulting node.
'frameId' (type: Page.FrameId) -> Frame this node belongs to.
'nodeId' (type: NodeId) -> Id of the node at given coordinates, only when enabled and requested document.
Description: Returns node id at given location. Depending on whether DOM domain is enabled, nodeId is
either returned or not.
- DOM_getNodeStackTraces(self, nodeId)
- Function path: DOM.getNodeStackTraces
Domain: DOM
Method name: getNodeStackTraces
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'nodeId' (type: NodeId) -> Id of the node to get stack traces for.
Returns:
'creation' (type: Runtime.StackTrace) -> Creation stack trace, if available.
Description: Gets stack traces associated with a Node. As of now, only provides stack trace for Node creation.
- DOM_getNodesForSubtreeByStyle(self, nodeId, computedStyles, **kwargs)
- Function path: DOM.getNodesForSubtreeByStyle
Domain: DOM
Method name: getNodesForSubtreeByStyle
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'nodeId' (type: NodeId) -> Node ID pointing to the root of a subtree.
'computedStyles' (type: array) -> The style to filter nodes by (includes nodes if any of properties matches).
Optional arguments:
'pierce' (type: boolean) -> Whether or not iframes and shadow roots in the same target should be traversed when returning the
results (default is false).
Returns:
'nodeIds' (type: array) -> Resulting nodes.
Description: Finds nodes with a given computed style in a subtree.
- DOM_getOuterHTML(self, **kwargs)
- Function path: DOM.getOuterHTML
Domain: DOM
Method name: getOuterHTML
Parameters:
Optional arguments:
'nodeId' (type: NodeId) -> Identifier of the node.
'backendNodeId' (type: BackendNodeId) -> Identifier of the backend node.
'objectId' (type: Runtime.RemoteObjectId) -> JavaScript object id of the node wrapper.
Returns:
'outerHTML' (type: string) -> Outer HTML markup.
Description: Returns node's HTML markup.
- DOM_getRelayoutBoundary(self, nodeId)
- Function path: DOM.getRelayoutBoundary
Domain: DOM
Method name: getRelayoutBoundary
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'nodeId' (type: NodeId) -> Id of the node.
Returns:
'nodeId' (type: NodeId) -> Relayout boundary node id for the given node.
Description: Returns the id of the nearest ancestor that is a relayout boundary.
- DOM_getSearchResults(self, searchId, fromIndex, toIndex)
- Function path: DOM.getSearchResults
Domain: DOM
Method name: getSearchResults
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'searchId' (type: string) -> Unique search session identifier.
'fromIndex' (type: integer) -> Start index of the search result to be returned.
'toIndex' (type: integer) -> End index of the search result to be returned.
Returns:
'nodeIds' (type: array) -> Ids of the search result nodes.
Description: Returns search results from given `fromIndex` to given `toIndex` from the search with the given
identifier.
- DOM_hideHighlight(self)
- Function path: DOM.hideHighlight
Domain: DOM
Method name: hideHighlight
No return value.
Description: Hides any highlight.
- DOM_highlightNode(self)
- Function path: DOM.highlightNode
Domain: DOM
Method name: highlightNode
No return value.
Description: Highlights DOM node.
- DOM_highlightRect(self)
- Function path: DOM.highlightRect
Domain: DOM
Method name: highlightRect
No return value.
Description: Highlights given rectangle.
- DOM_markUndoableState(self)
- Function path: DOM.markUndoableState
Domain: DOM
Method name: markUndoableState
WARNING: This function is marked 'Experimental'!
No return value.
Description: Marks last undoable state.
- DOM_moveTo(self, nodeId, targetNodeId, **kwargs)
- Function path: DOM.moveTo
Domain: DOM
Method name: moveTo
Parameters:
Required arguments:
'nodeId' (type: NodeId) -> Id of the node to move.
'targetNodeId' (type: NodeId) -> Id of the element to drop the moved node into.
Optional arguments:
'insertBeforeNodeId' (type: NodeId) -> Drop node before this one (if absent, the moved node becomes the last child of
`targetNodeId`).
Returns:
'nodeId' (type: NodeId) -> New id of the moved node.
Description: Moves node into the new container, places it before the given anchor.
- DOM_performSearch(self, query, **kwargs)
- Function path: DOM.performSearch
Domain: DOM
Method name: performSearch
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'query' (type: string) -> Plain text or query selector or XPath search query.
Optional arguments:
'includeUserAgentShadowDOM' (type: boolean) -> True to search in user agent shadow DOM.
Returns:
'searchId' (type: string) -> Unique search session identifier.
'resultCount' (type: integer) -> Number of search results.
Description: Searches for a given string in the DOM tree. Use `getSearchResults` to access search results or
`cancelSearch` to end this search session.
- DOM_pushNodeByPathToFrontend(self, path)
- Function path: DOM.pushNodeByPathToFrontend
Domain: DOM
Method name: pushNodeByPathToFrontend
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'path' (type: string) -> Path to node in the proprietary format.
Returns:
'nodeId' (type: NodeId) -> Id of the node for given path.
Description: Requests that the node is sent to the caller given its path. // FIXME, use XPath
- DOM_pushNodesByBackendIdsToFrontend(self, backendNodeIds)
- Function path: DOM.pushNodesByBackendIdsToFrontend
Domain: DOM
Method name: pushNodesByBackendIdsToFrontend
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'backendNodeIds' (type: array) -> The array of backend node ids.
Returns:
'nodeIds' (type: array) -> The array of ids of pushed nodes that correspond to the backend ids specified in
backendNodeIds.
Description: Requests that a batch of nodes is sent to the caller given their backend node ids.
- DOM_querySelector(self, nodeId, selector)
- Function path: DOM.querySelector
Domain: DOM
Method name: querySelector
Parameters:
Required arguments:
'nodeId' (type: NodeId) -> Id of the node to query upon.
'selector' (type: string) -> Selector string.
Returns:
'nodeId' (type: NodeId) -> Query selector result.
Description: Executes `querySelector` on a given node.
- DOM_querySelectorAll(self, nodeId, selector)
- Function path: DOM.querySelectorAll
Domain: DOM
Method name: querySelectorAll
Parameters:
Required arguments:
'nodeId' (type: NodeId) -> Id of the node to query upon.
'selector' (type: string) -> Selector string.
Returns:
'nodeIds' (type: array) -> Query selector result.
Description: Executes `querySelectorAll` on a given node.
- DOM_redo(self)
- Function path: DOM.redo
Domain: DOM
Method name: redo
WARNING: This function is marked 'Experimental'!
No return value.
Description: Re-does the last undone action.
- DOM_removeAttribute(self, nodeId, name)
- Function path: DOM.removeAttribute
Domain: DOM
Method name: removeAttribute
Parameters:
Required arguments:
'nodeId' (type: NodeId) -> Id of the element to remove attribute from.
'name' (type: string) -> Name of the attribute to remove.
No return value.
Description: Removes attribute with given name from an element with given id.
- DOM_removeNode(self, nodeId)
- Function path: DOM.removeNode
Domain: DOM
Method name: removeNode
Parameters:
Required arguments:
'nodeId' (type: NodeId) -> Id of the node to remove.
No return value.
Description: Removes node with given id.
- DOM_requestChildNodes(self, nodeId, **kwargs)
- Function path: DOM.requestChildNodes
Domain: DOM
Method name: requestChildNodes
Parameters:
Required arguments:
'nodeId' (type: NodeId) -> Id of the node to get children for.
Optional arguments:
'depth' (type: integer) -> The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the
entire subtree or provide an integer larger than 0.
'pierce' (type: boolean) -> Whether or not iframes and shadow roots should be traversed when returning the sub-tree
(default is false).
No return value.
Description: Requests that children of the node with given id are returned to the caller in form of
`setChildNodes` events where not only immediate children are retrieved, but all children down to
the specified depth.
- DOM_requestNode(self, objectId)
- Function path: DOM.requestNode
Domain: DOM
Method name: requestNode
Parameters:
Required arguments:
'objectId' (type: Runtime.RemoteObjectId) -> JavaScript object id to convert into node.
Returns:
'nodeId' (type: NodeId) -> Node id for given object.
Description: Requests that the node is sent to the caller given the JavaScript node object reference. All
nodes that form the path from the node to the root are also sent to the client as a series of
`setChildNodes` notifications.
- DOM_resolveNode(self, **kwargs)
- Function path: DOM.resolveNode
Domain: DOM
Method name: resolveNode
Parameters:
Optional arguments:
'nodeId' (type: NodeId) -> Id of the node to resolve.
'backendNodeId' (type: DOM.BackendNodeId) -> Backend identifier of the node to resolve.
'objectGroup' (type: string) -> Symbolic group name that can be used to release multiple objects.
'executionContextId' (type: Runtime.ExecutionContextId) -> Execution context in which to resolve the node.
Returns:
'object' (type: Runtime.RemoteObject) -> JavaScript object wrapper for given node.
Description: Resolves the JavaScript node object for a given NodeId or BackendNodeId.
- DOM_scrollIntoViewIfNeeded(self, **kwargs)
- Function path: DOM.scrollIntoViewIfNeeded
Domain: DOM
Method name: scrollIntoViewIfNeeded
WARNING: This function is marked 'Experimental'!
Parameters:
Optional arguments:
'nodeId' (type: NodeId) -> Identifier of the node.
'backendNodeId' (type: BackendNodeId) -> Identifier of the backend node.
'objectId' (type: Runtime.RemoteObjectId) -> JavaScript object id of the node wrapper.
'rect' (type: Rect) -> The rect to be scrolled into view, relative to the node's border box, in CSS pixels.
When omitted, center of the node will be used, similar to Element.scrollIntoView.
No return value.
Description: Scrolls the specified rect of the given node into view if not already visible.
Note: exactly one between nodeId, backendNodeId and objectId should be passed
to identify the node.
- DOM_setAttributeValue(self, nodeId, name, value)
- Function path: DOM.setAttributeValue
Domain: DOM
Method name: setAttributeValue
Parameters:
Required arguments:
'nodeId' (type: NodeId) -> Id of the element to set attribute for.
'name' (type: string) -> Attribute name.
'value' (type: string) -> Attribute value.
No return value.
Description: Sets attribute for an element with given id.
- DOM_setAttributesAsText(self, nodeId, text, **kwargs)
- Function path: DOM.setAttributesAsText
Domain: DOM
Method name: setAttributesAsText
Parameters:
Required arguments:
'nodeId' (type: NodeId) -> Id of the element to set attributes for.
'text' (type: string) -> Text with a number of attributes. Will parse this text using HTML parser.
Optional arguments:
'name' (type: string) -> Attribute name to replace with new attributes derived from text in case text parsed
successfully.
No return value.
Description: Sets attributes on element with given id. This method is useful when user edits some existing
attribute value and types in several attribute name/value pairs.
- DOM_setFileInputFiles(self, files, **kwargs)
- Function path: DOM.setFileInputFiles
Domain: DOM
Method name: setFileInputFiles
Parameters:
Required arguments:
'files' (type: array) -> Array of file paths to set.
Optional arguments:
'nodeId' (type: NodeId) -> Identifier of the node.
'backendNodeId' (type: BackendNodeId) -> Identifier of the backend node.
'objectId' (type: Runtime.RemoteObjectId) -> JavaScript object id of the node wrapper.
No return value.
Description: Sets files for the given file input element.
- DOM_setInspectedNode(self, nodeId)
- Function path: DOM.setInspectedNode
Domain: DOM
Method name: setInspectedNode
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'nodeId' (type: NodeId) -> DOM node id to be accessible by means of $x command line API.
No return value.
Description: Enables console to refer to the node with given id via $x (see Command Line API for more details
$x functions).
- DOM_setNodeName(self, nodeId, name)
- Function path: DOM.setNodeName
Domain: DOM
Method name: setNodeName
Parameters:
Required arguments:
'nodeId' (type: NodeId) -> Id of the node to set name for.
'name' (type: string) -> New node's name.
Returns:
'nodeId' (type: NodeId) -> New node's id.
Description: Sets node name for a node with given id.
- DOM_setNodeStackTracesEnabled(self, enable)
- Function path: DOM.setNodeStackTracesEnabled
Domain: DOM
Method name: setNodeStackTracesEnabled
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'enable' (type: boolean) -> Enable or disable.
No return value.
Description: Sets if stack traces should be captured for Nodes. See `Node.getNodeStackTraces`. Default is disabled.
- DOM_setNodeValue(self, nodeId, value)
- Function path: DOM.setNodeValue
Domain: DOM
Method name: setNodeValue
Parameters:
Required arguments:
'nodeId' (type: NodeId) -> Id of the node to set value for.
'value' (type: string) -> New node's value.
No return value.
Description: Sets node value for a node with given id.
- DOM_setOuterHTML(self, nodeId, outerHTML)
- Function path: DOM.setOuterHTML
Domain: DOM
Method name: setOuterHTML
Parameters:
Required arguments:
'nodeId' (type: NodeId) -> Id of the node to set markup for.
'outerHTML' (type: string) -> Outer HTML markup to set.
No return value.
Description: Sets node HTML markup, returns new node id.
- DOM_undo(self)
- Function path: DOM.undo
Domain: DOM
Method name: undo
WARNING: This function is marked 'Experimental'!
No return value.
Description: Undoes the last performed action.
- Database_disable(self)
- Function path: Database.disable
Domain: Database
Method name: disable
No return value.
Description: Disables database tracking, prevents database events from being sent to the client.
- Database_enable(self)
- Function path: Database.enable
Domain: Database
Method name: enable
No return value.
Description: Enables database tracking, database events will now be delivered to the client.
- Database_executeSQL(self, databaseId, query)
- Function path: Database.executeSQL
Domain: Database
Method name: executeSQL
Parameters:
Required arguments:
'databaseId' (type: DatabaseId) -> No description
'query' (type: string) -> No description
Returns:
'columnNames' (type: array) -> No description
'values' (type: array) -> No description
'sqlError' (type: Error) -> No description
- Database_getDatabaseTableNames(self, databaseId)
- Function path: Database.getDatabaseTableNames
Domain: Database
Method name: getDatabaseTableNames
Parameters:
Required arguments:
'databaseId' (type: DatabaseId) -> No description
Returns:
'tableNames' (type: array) -> No description
- Debugger_continueToLocation(self, location, **kwargs)
- Function path: Debugger.continueToLocation
Domain: Debugger
Method name: continueToLocation
Parameters:
Required arguments:
'location' (type: Location) -> Location to continue to.
Optional arguments:
'targetCallFrames' (type: string) -> No description
No return value.
Description: Continues execution until specific location is reached.
- Debugger_disable(self)
- Function path: Debugger.disable
Domain: Debugger
Method name: disable
No return value.
Description: Disables debugger for given page.
- Debugger_enable(self, **kwargs)
- Function path: Debugger.enable
Domain: Debugger
Method name: enable
Parameters:
Optional arguments:
'maxScriptsCacheSize' (type: number) -> The maximum size in bytes of collected scripts (not referenced by other heap objects)
the debugger can hold. Puts no limit if paramter is omitted.
Returns:
'debuggerId' (type: Runtime.UniqueDebuggerId) -> Unique identifier of the debugger.
Description: Enables debugger for the given page. Clients should not assume that the debugging has been
enabled until the result for this command is received.
- Debugger_evaluateOnCallFrame(self, callFrameId, expression, **kwargs)
- Function path: Debugger.evaluateOnCallFrame
Domain: Debugger
Method name: evaluateOnCallFrame
Parameters:
Required arguments:
'callFrameId' (type: CallFrameId) -> Call frame identifier to evaluate on.
'expression' (type: string) -> Expression to evaluate.
Optional arguments:
'objectGroup' (type: string) -> String object group name to put result into (allows rapid releasing resulting object handles
using `releaseObjectGroup`).
'includeCommandLineAPI' (type: boolean) -> Specifies whether command line API should be available to the evaluated expression, defaults
to false.
'silent' (type: boolean) -> In silent mode exceptions thrown during evaluation are not reported and do not pause
execution. Overrides `setPauseOnException` state.
'returnByValue' (type: boolean) -> Whether the result is expected to be a JSON object that should be sent by value.
'generatePreview' (type: boolean) -> Whether preview should be generated for the result.
'throwOnSideEffect' (type: boolean) -> Whether to throw an exception if side effect cannot be ruled out during evaluation.
'timeout' (type: Runtime.TimeDelta) -> Terminate execution after timing out (number of milliseconds).
Returns:
'result' (type: Runtime.RemoteObject) -> Object wrapper for the evaluation result.
'exceptionDetails' (type: Runtime.ExceptionDetails) -> Exception details.
Description: Evaluates expression on a given call frame.
- Debugger_getPossibleBreakpoints(self, start, **kwargs)
- Function path: Debugger.getPossibleBreakpoints
Domain: Debugger
Method name: getPossibleBreakpoints
Parameters:
Required arguments:
'start' (type: Location) -> Start of range to search possible breakpoint locations in.
Optional arguments:
'end' (type: Location) -> End of range to search possible breakpoint locations in (excluding). When not specified, end
of scripts is used as end of range.
'restrictToFunction' (type: boolean) -> Only consider locations which are in the same (non-nested) function as start.
Returns:
'locations' (type: array) -> List of the possible breakpoint locations.
Description: Returns possible locations for breakpoint. scriptId in start and end range locations should be
the same.
- Debugger_getScriptSource(self, scriptId)
- Function path: Debugger.getScriptSource
Domain: Debugger
Method name: getScriptSource
Parameters:
Required arguments:
'scriptId' (type: Runtime.ScriptId) -> Id of the script to get source for.
Returns:
'scriptSource' (type: string) -> Script source (empty in case of Wasm bytecode).
'bytecode' (type: string) -> Wasm bytecode. (Encoded as a base64 string when passed over JSON)
Description: Returns source for the script with given id.
- Debugger_getStackTrace(self, stackTraceId)
- Function path: Debugger.getStackTrace
Domain: Debugger
Method name: getStackTrace
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'stackTraceId' (type: Runtime.StackTraceId) -> No description
Returns:
'stackTrace' (type: Runtime.StackTrace) -> No description
Description: Returns stack trace with given `stackTraceId`.
- Debugger_getWasmBytecode(self, scriptId)
- Function path: Debugger.getWasmBytecode
Domain: Debugger
Method name: getWasmBytecode
Parameters:
Required arguments:
'scriptId' (type: Runtime.ScriptId) -> Id of the Wasm script to get source for.
Returns:
'bytecode' (type: string) -> Script source. (Encoded as a base64 string when passed over JSON)
Description: This command is deprecated. Use getScriptSource instead.
- Debugger_pause(self)
- Function path: Debugger.pause
Domain: Debugger
Method name: pause
No return value.
Description: Stops on the next JavaScript statement.
- Debugger_pauseOnAsyncCall(self, parentStackTraceId)
- Function path: Debugger.pauseOnAsyncCall
Domain: Debugger
Method name: pauseOnAsyncCall
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'parentStackTraceId' (type: Runtime.StackTraceId) -> Debugger will pause when async call with given stack trace is started.
No return value.
- Debugger_removeBreakpoint(self, breakpointId)
- Function path: Debugger.removeBreakpoint
Domain: Debugger
Method name: removeBreakpoint
Parameters:
Required arguments:
'breakpointId' (type: BreakpointId) -> No description
No return value.
Description: Removes JavaScript breakpoint.
- Debugger_restartFrame(self, callFrameId)
- Function path: Debugger.restartFrame
Domain: Debugger
Method name: restartFrame
Parameters:
Required arguments:
'callFrameId' (type: CallFrameId) -> Call frame identifier to evaluate on.
Returns:
'callFrames' (type: array) -> New stack trace.
'asyncStackTrace' (type: Runtime.StackTrace) -> Async stack trace, if any.
'asyncStackTraceId' (type: Runtime.StackTraceId) -> Async stack trace, if any.
Description: Restarts particular call frame from the beginning.
- Debugger_resume(self, **kwargs)
- Function path: Debugger.resume
Domain: Debugger
Method name: resume
Parameters:
Optional arguments:
'terminateOnResume' (type: boolean) -> Set to true to terminate execution upon resuming execution. In contrast
to Runtime.terminateExecution, this will allows to execute further
JavaScript (i.e. via evaluation) until execution of the paused code
is actually resumed, at which point termination is triggered.
If execution is currently not paused, this parameter has no effect.
No return value.
Description: Resumes JavaScript execution.
- Debugger_searchInContent(self, scriptId, query, **kwargs)
- Function path: Debugger.searchInContent
Domain: Debugger
Method name: searchInContent
Parameters:
Required arguments:
'scriptId' (type: Runtime.ScriptId) -> Id of the script to search in.
'query' (type: string) -> String to search for.
Optional arguments:
'caseSensitive' (type: boolean) -> If true, search is case sensitive.
'isRegex' (type: boolean) -> If true, treats string parameter as regex.
Returns:
'result' (type: array) -> List of search matches.
Description: Searches for given string in script content.
- Debugger_setAsyncCallStackDepth(self, maxDepth)
- Function path: Debugger.setAsyncCallStackDepth
Domain: Debugger
Method name: setAsyncCallStackDepth
Parameters:
Required arguments:
'maxDepth' (type: integer) -> Maximum depth of async call stacks. Setting to `0` will effectively disable collecting async
call stacks (default).
No return value.
Description: Enables or disables async call stacks tracking.
- Debugger_setBlackboxPatterns(self, patterns)
- Function path: Debugger.setBlackboxPatterns
Domain: Debugger
Method name: setBlackboxPatterns
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'patterns' (type: array) -> Array of regexps that will be used to check script url for blackbox state.
No return value.
Description: Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in
scripts with url matching one of the patterns. VM will try to leave blackboxed script by
performing 'step in' several times, finally resorting to 'step out' if unsuccessful.
- Debugger_setBlackboxedRanges(self, scriptId, positions)
- Function path: Debugger.setBlackboxedRanges
Domain: Debugger
Method name: setBlackboxedRanges
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'scriptId' (type: Runtime.ScriptId) -> Id of the script.
'positions' (type: array) -> No description
No return value.
Description: Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted
scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful.
Positions array contains positions where blackbox state is changed. First interval isn't
blackboxed. Array should be sorted.
- Debugger_setBreakpoint(self, location, **kwargs)
- Function path: Debugger.setBreakpoint
Domain: Debugger
Method name: setBreakpoint
Parameters:
Required arguments:
'location' (type: Location) -> Location to set breakpoint in.
Optional arguments:
'condition' (type: string) -> Expression to use as a breakpoint condition. When specified, debugger will only stop on the
breakpoint if this expression evaluates to true.
Returns:
'breakpointId' (type: BreakpointId) -> Id of the created breakpoint for further reference.
'actualLocation' (type: Location) -> Location this breakpoint resolved into.
Description: Sets JavaScript breakpoint at a given location.
- Debugger_setBreakpointByUrl(self, lineNumber, **kwargs)
- Function path: Debugger.setBreakpointByUrl
Domain: Debugger
Method name: setBreakpointByUrl
Parameters:
Required arguments:
'lineNumber' (type: integer) -> Line number to set breakpoint at.
Optional arguments:
'url' (type: string) -> URL of the resources to set breakpoint on.
'urlRegex' (type: string) -> Regex pattern for the URLs of the resources to set breakpoints on. Either `url` or
`urlRegex` must be specified.
'scriptHash' (type: string) -> Script hash of the resources to set breakpoint on.
'columnNumber' (type: integer) -> Offset in the line to set breakpoint at.
'condition' (type: string) -> Expression to use as a breakpoint condition. When specified, debugger will only stop on the
breakpoint if this expression evaluates to true.
Returns:
'breakpointId' (type: BreakpointId) -> Id of the created breakpoint for further reference.
'locations' (type: array) -> List of the locations this breakpoint resolved into upon addition.
Description: Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this
command is issued, all existing parsed scripts will have breakpoints resolved and returned in
`locations` property. Further matching script parsing will result in subsequent
`breakpointResolved` events issued. This logical breakpoint will survive page reloads.
- Debugger_setBreakpointOnFunctionCall(self, objectId, **kwargs)
- Function path: Debugger.setBreakpointOnFunctionCall
Domain: Debugger
Method name: setBreakpointOnFunctionCall
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'objectId' (type: Runtime.RemoteObjectId) -> Function object id.
Optional arguments:
'condition' (type: string) -> Expression to use as a breakpoint condition. When specified, debugger will
stop on the breakpoint if this expression evaluates to true.
Returns:
'breakpointId' (type: BreakpointId) -> Id of the created breakpoint for further reference.
Description: Sets JavaScript breakpoint before each call to the given function.
If another function was created from the same source as a given one,
calling it will also trigger the breakpoint.
- Debugger_setBreakpointsActive(self, active)
- Function path: Debugger.setBreakpointsActive
Domain: Debugger
Method name: setBreakpointsActive
Parameters:
Required arguments:
'active' (type: boolean) -> New value for breakpoints active state.
No return value.
Description: Activates / deactivates all breakpoints on the page.
- Debugger_setInstrumentationBreakpoint(self, instrumentation)
- Function path: Debugger.setInstrumentationBreakpoint
Domain: Debugger
Method name: setInstrumentationBreakpoint
Parameters:
Required arguments:
'instrumentation' (type: string) -> Instrumentation name.
Returns:
'breakpointId' (type: BreakpointId) -> Id of the created breakpoint for further reference.
Description: Sets instrumentation breakpoint.
- Debugger_setPauseOnExceptions(self, state)
- Function path: Debugger.setPauseOnExceptions
Domain: Debugger
Method name: setPauseOnExceptions
Parameters:
Required arguments:
'state' (type: string) -> Pause on exceptions mode.
No return value.
Description: Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions or
no exceptions. Initial pause on exceptions state is `none`.
- Debugger_setReturnValue(self, newValue)
- Function path: Debugger.setReturnValue
Domain: Debugger
Method name: setReturnValue
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'newValue' (type: Runtime.CallArgument) -> New return value.
No return value.
Description: Changes return value in top frame. Available only at return break position.
- Debugger_setScriptSource(self, scriptId, scriptSource, **kwargs)
- Function path: Debugger.setScriptSource
Domain: Debugger
Method name: setScriptSource
Parameters:
Required arguments:
'scriptId' (type: Runtime.ScriptId) -> Id of the script to edit.
'scriptSource' (type: string) -> New content of the script.
Optional arguments:
'dryRun' (type: boolean) -> If true the change will not actually be applied. Dry run may be used to get result
description without actually modifying the code.
Returns:
'callFrames' (type: array) -> New stack trace in case editing has happened while VM was stopped.
'stackChanged' (type: boolean) -> Whether current call stack was modified after applying the changes.
'asyncStackTrace' (type: Runtime.StackTrace) -> Async stack trace, if any.
'asyncStackTraceId' (type: Runtime.StackTraceId) -> Async stack trace, if any.
'exceptionDetails' (type: Runtime.ExceptionDetails) -> Exception details if any.
Description: Edits JavaScript source live.
- Debugger_setSkipAllPauses(self, skip)
- Function path: Debugger.setSkipAllPauses
Domain: Debugger
Method name: setSkipAllPauses
Parameters:
Required arguments:
'skip' (type: boolean) -> New value for skip pauses state.
No return value.
Description: Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc).
- Debugger_setVariableValue(self, scopeNumber, variableName, newValue, callFrameId)
- Function path: Debugger.setVariableValue
Domain: Debugger
Method name: setVariableValue
Parameters:
Required arguments:
'scopeNumber' (type: integer) -> 0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch'
scope types are allowed. Other scopes could be manipulated manually.
'variableName' (type: string) -> Variable name.
'newValue' (type: Runtime.CallArgument) -> New variable value.
'callFrameId' (type: CallFrameId) -> Id of callframe that holds variable.
No return value.
Description: Changes value of variable in a callframe. Object-based scopes are not supported and must be
mutated manually.
- Debugger_stepInto(self, **kwargs)
- Function path: Debugger.stepInto
Domain: Debugger
Method name: stepInto
Parameters:
Optional arguments:
'breakOnAsyncCall' (type: boolean) -> Debugger will pause on the execution of the first async task which was scheduled
before next pause.
'skipList' (type: array) -> The skipList specifies location ranges that should be skipped on step into.
No return value.
Description: Steps into the function call.
- Debugger_stepOut(self)
- Function path: Debugger.stepOut
Domain: Debugger
Method name: stepOut
No return value.
Description: Steps out of the function call.
- Debugger_stepOver(self, **kwargs)
- Function path: Debugger.stepOver
Domain: Debugger
Method name: stepOver
Parameters:
Optional arguments:
'skipList' (type: array) -> The skipList specifies location ranges that should be skipped on step over.
No return value.
Description: Steps over the statement.
- DeviceOrientation_clearDeviceOrientationOverride(self)
- Function path: DeviceOrientation.clearDeviceOrientationOverride
Domain: DeviceOrientation
Method name: clearDeviceOrientationOverride
No return value.
Description: Clears the overridden Device Orientation.
- DeviceOrientation_setDeviceOrientationOverride(self, alpha, beta, gamma)
- Function path: DeviceOrientation.setDeviceOrientationOverride
Domain: DeviceOrientation
Method name: setDeviceOrientationOverride
Parameters:
Required arguments:
'alpha' (type: number) -> Mock alpha
'beta' (type: number) -> Mock beta
'gamma' (type: number) -> Mock gamma
No return value.
Description: Overrides the Device Orientation.
- Emulation_canEmulate(self)
- Function path: Emulation.canEmulate
Domain: Emulation
Method name: canEmulate
Returns:
'result' (type: boolean) -> True if emulation is supported.
Description: Tells whether emulation is supported.
- Emulation_clearDeviceMetricsOverride(self)
- Function path: Emulation.clearDeviceMetricsOverride
Domain: Emulation
Method name: clearDeviceMetricsOverride
No return value.
Description: Clears the overridden device metrics.
- Emulation_clearGeolocationOverride(self)
- Function path: Emulation.clearGeolocationOverride
Domain: Emulation
Method name: clearGeolocationOverride
No return value.
Description: Clears the overridden Geolocation Position and Error.
- Emulation_clearIdleOverride(self)
- Function path: Emulation.clearIdleOverride
Domain: Emulation
Method name: clearIdleOverride
WARNING: This function is marked 'Experimental'!
No return value.
Description: Clears Idle state overrides.
- Emulation_resetPageScaleFactor(self)
- Function path: Emulation.resetPageScaleFactor
Domain: Emulation
Method name: resetPageScaleFactor
WARNING: This function is marked 'Experimental'!
No return value.
Description: Requests that page scale factor is reset to initial values.
- Emulation_setCPUThrottlingRate(self, rate)
- Function path: Emulation.setCPUThrottlingRate
Domain: Emulation
Method name: setCPUThrottlingRate
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'rate' (type: number) -> Throttling rate as a slowdown factor (1 is no throttle, 2 is 2x slowdown, etc).
No return value.
Description: Enables CPU throttling to emulate slow CPUs.
- Emulation_setDefaultBackgroundColorOverride(self, **kwargs)
- Function path: Emulation.setDefaultBackgroundColorOverride
Domain: Emulation
Method name: setDefaultBackgroundColorOverride
Parameters:
Optional arguments:
'color' (type: DOM.RGBA) -> RGBA of the default background color. If not specified, any existing override will be
cleared.
No return value.
Description: Sets or clears an override of the default background color of the frame. This override is used
if the content does not specify one.
- Emulation_setDeviceMetricsOverride(self, width, height, deviceScaleFactor, mobile, **kwargs)
- Function path: Emulation.setDeviceMetricsOverride
Domain: Emulation
Method name: setDeviceMetricsOverride
Parameters:
Required arguments:
'width' (type: integer) -> Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override.
'height' (type: integer) -> Overriding height value in pixels (minimum 0, maximum 10000000). 0 disables the override.
'deviceScaleFactor' (type: number) -> Overriding device scale factor value. 0 disables the override.
'mobile' (type: boolean) -> Whether to emulate mobile device. This includes viewport meta tag, overlay scrollbars, text
autosizing and more.
Optional arguments:
'scale' (type: number) -> Scale to apply to resulting view image.
'screenWidth' (type: integer) -> Overriding screen width value in pixels (minimum 0, maximum 10000000).
'screenHeight' (type: integer) -> Overriding screen height value in pixels (minimum 0, maximum 10000000).
'positionX' (type: integer) -> Overriding view X position on screen in pixels (minimum 0, maximum 10000000).
'positionY' (type: integer) -> Overriding view Y position on screen in pixels (minimum 0, maximum 10000000).
'dontSetVisibleSize' (type: boolean) -> Do not set visible view size, rely upon explicit setVisibleSize call.
'screenOrientation' (type: ScreenOrientation) -> Screen orientation override.
'viewport' (type: Page.Viewport) -> If set, the visible area of the page will be overridden to this viewport. This viewport
change is not observed by the page, e.g. viewport-relative elements do not change positions.
'displayFeature' (type: DisplayFeature) -> If set, the display feature of a multi-segment screen. If not set, multi-segment support
is turned-off.
No return value.
Description: 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).
- Emulation_setDisabledImageTypes(self, imageTypes)
- Function path: Emulation.setDisabledImageTypes
Domain: Emulation
Method name: setDisabledImageTypes
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'imageTypes' (type: array) -> Image types to disable.
No return value.
- Emulation_setDocumentCookieDisabled(self, disabled)
- Function path: Emulation.setDocumentCookieDisabled
Domain: Emulation
Method name: setDocumentCookieDisabled
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'disabled' (type: boolean) -> Whether document.coookie API should be disabled.
No return value.
- Emulation_setEmitTouchEventsForMouse(self, enabled, **kwargs)
- Function path: Emulation.setEmitTouchEventsForMouse
Domain: Emulation
Method name: setEmitTouchEventsForMouse
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'enabled' (type: boolean) -> Whether touch emulation based on mouse input should be enabled.
Optional arguments:
'configuration' (type: string) -> Touch/gesture events configuration. Default: current platform.
No return value.
- Emulation_setEmulatedMedia(self, **kwargs)
- Function path: Emulation.setEmulatedMedia
Domain: Emulation
Method name: setEmulatedMedia
Parameters:
Optional arguments:
'media' (type: string) -> Media type to emulate. Empty string disables the override.
'features' (type: array) -> Media features to emulate.
No return value.
Description: Emulates the given media type or media feature for CSS media queries.
- Emulation_setEmulatedVisionDeficiency(self, type)
- Function path: Emulation.setEmulatedVisionDeficiency
Domain: Emulation
Method name: setEmulatedVisionDeficiency
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'type' (type: string) -> Vision deficiency to emulate.
No return value.
Description: Emulates the given vision deficiency.
- Emulation_setFocusEmulationEnabled(self, enabled)
- Function path: Emulation.setFocusEmulationEnabled
Domain: Emulation
Method name: setFocusEmulationEnabled
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'enabled' (type: boolean) -> Whether to enable to disable focus emulation.
No return value.
Description: Enables or disables simulating a focused and active page.
- Emulation_setGeolocationOverride(self, **kwargs)
- Function path: Emulation.setGeolocationOverride
Domain: Emulation
Method name: setGeolocationOverride
Parameters:
Optional arguments:
'latitude' (type: number) -> Mock latitude
'longitude' (type: number) -> Mock longitude
'accuracy' (type: number) -> Mock accuracy
No return value.
Description: Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position
unavailable.
- Emulation_setIdleOverride(self, isUserActive, isScreenUnlocked)
- Function path: Emulation.setIdleOverride
Domain: Emulation
Method name: setIdleOverride
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'isUserActive' (type: boolean) -> Mock isUserActive
'isScreenUnlocked' (type: boolean) -> Mock isScreenUnlocked
No return value.
Description: Overrides the Idle state.
- Emulation_setLocaleOverride(self, **kwargs)
- Function path: Emulation.setLocaleOverride
Domain: Emulation
Method name: setLocaleOverride
WARNING: This function is marked 'Experimental'!
Parameters:
Optional arguments:
'locale' (type: string) -> ICU style C locale (e.g. "en_US"). If not specified or empty, disables the override and
restores default host system locale.
No return value.
Description: Overrides default host system locale with the specified one.
- Emulation_setNavigatorOverrides(self, platform)
- Function path: Emulation.setNavigatorOverrides
Domain: Emulation
Method name: setNavigatorOverrides
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'platform' (type: string) -> The platform navigator.platform should return.
No return value.
Description: Overrides value returned by the javascript navigator object.
- Emulation_setPageScaleFactor(self, pageScaleFactor)
- Function path: Emulation.setPageScaleFactor
Domain: Emulation
Method name: setPageScaleFactor
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'pageScaleFactor' (type: number) -> Page scale factor.
No return value.
Description: Sets a specified page scale factor.
- Emulation_setScriptExecutionDisabled(self, value)
- Function path: Emulation.setScriptExecutionDisabled
Domain: Emulation
Method name: setScriptExecutionDisabled
Parameters:
Required arguments:
'value' (type: boolean) -> Whether script execution should be disabled in the page.
No return value.
Description: Switches script execution in the page.
- Emulation_setScrollbarsHidden(self, hidden)
- Function path: Emulation.setScrollbarsHidden
Domain: Emulation
Method name: setScrollbarsHidden
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'hidden' (type: boolean) -> Whether scrollbars should be always hidden.
No return value.
- Emulation_setTimezoneOverride(self, timezoneId)
- Function path: Emulation.setTimezoneOverride
Domain: Emulation
Method name: setTimezoneOverride
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'timezoneId' (type: string) -> The timezone identifier. If empty, disables the override and
restores default host system timezone.
No return value.
Description: Overrides default host system timezone with the specified one.
- Emulation_setTouchEmulationEnabled(self, enabled, **kwargs)
- Function path: Emulation.setTouchEmulationEnabled
Domain: Emulation
Method name: setTouchEmulationEnabled
Parameters:
Required arguments:
'enabled' (type: boolean) -> Whether the touch event emulation should be enabled.
Optional arguments:
'maxTouchPoints' (type: integer) -> Maximum touch points supported. Defaults to one.
No return value.
Description: Enables touch on platforms which do not support them.
- Emulation_setUserAgentOverride(self, userAgent, **kwargs)
- Function path: Emulation.setUserAgentOverride
Domain: Emulation
Method name: setUserAgentOverride
Parameters:
Required arguments:
'userAgent' (type: string) -> User agent to use.
Optional arguments:
'acceptLanguage' (type: string) -> Browser langugage to emulate.
'platform' (type: string) -> The platform navigator.platform should return.
'userAgentMetadata' (type: UserAgentMetadata) -> To be sent in Sec-CH-UA-* headers and returned in navigator.userAgentData
No return value.
Description: Allows overriding user agent with the given string.
- Emulation_setVirtualTimePolicy(self, policy, **kwargs)
- Function path: Emulation.setVirtualTimePolicy
Domain: Emulation
Method name: setVirtualTimePolicy
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'policy' (type: VirtualTimePolicy) -> No description
Optional arguments:
'budget' (type: number) -> If set, after this many virtual milliseconds have elapsed virtual time will be paused and a
virtualTimeBudgetExpired event is sent.
'maxVirtualTimeTaskStarvationCount' (type: integer) -> If set this specifies the maximum number of tasks that can be run before virtual is forced
forwards to prevent deadlock.
'waitForNavigation' (type: boolean) -> If set the virtual time policy change should be deferred until any frame starts navigating.
Note any previous deferred policy change is superseded.
'initialVirtualTime' (type: Network.TimeSinceEpoch) -> If set, base::Time::Now will be overridden to initially return this value.
Returns:
'virtualTimeTicksBase' (type: number) -> Absolute timestamp at which virtual time was first enabled (up time in milliseconds).
Description: Turns on virtual time for all frames (replacing real-time with a synthetic time source) and sets
the current virtual time policy. Note this supersedes any previous time budget.
- Emulation_setVisibleSize(self, width, height)
- Function path: Emulation.setVisibleSize
Domain: Emulation
Method name: setVisibleSize
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'width' (type: integer) -> Frame width (DIP).
'height' (type: integer) -> Frame height (DIP).
No return value.
Description: Resizes the frame/viewport of the page. Note that this does not affect the frame's container
(e.g. browser window). Can be used to produce screenshots of the specified size. Not supported
on Android.
- Fetch_continueRequest(self, requestId, **kwargs)
- Function path: Fetch.continueRequest
Domain: Fetch
Method name: continueRequest
Parameters:
Required arguments:
'requestId' (type: RequestId) -> An id the client received in requestPaused event.
Optional arguments:
'url' (type: string) -> If set, the request url will be modified in a way that's not observable by page.
'method' (type: string) -> If set, the request method is overridden.
'postData' (type: string) -> If set, overrides the post data in the request. (Encoded as a base64 string when passed over JSON)
'headers' (type: array) -> If set, overrides the request headers.
No return value.
Description: Continues the request, optionally modifying some of its parameters.
- Fetch_continueWithAuth(self, requestId, authChallengeResponse)
- Function path: Fetch.continueWithAuth
Domain: Fetch
Method name: continueWithAuth
Parameters:
Required arguments:
'requestId' (type: RequestId) -> An id the client received in authRequired event.
'authChallengeResponse' (type: AuthChallengeResponse) -> Response to with an authChallenge.
No return value.
Description: Continues a request supplying authChallengeResponse following authRequired event.
- Fetch_disable(self)
- Function path: Fetch.disable
Domain: Fetch
Method name: disable
No return value.
Description: Disables the fetch domain.
- Fetch_enable(self, **kwargs)
- Function path: Fetch.enable
Domain: Fetch
Method name: enable
Parameters:
Optional arguments:
'patterns' (type: array) -> If specified, only requests matching any of these patterns will produce
fetchRequested event and will be paused until clients response. If not set,
all requests will be affected.
'handleAuthRequests' (type: boolean) -> If true, authRequired events will be issued and requests will be paused
expecting a call to continueWithAuth.
No return value.
Description: Enables issuing of requestPaused events. A request will be paused until client
calls one of failRequest, fulfillRequest or continueRequest/continueWithAuth.
- Fetch_failRequest(self, requestId, errorReason)
- Function path: Fetch.failRequest
Domain: Fetch
Method name: failRequest
Parameters:
Required arguments:
'requestId' (type: RequestId) -> An id the client received in requestPaused event.
'errorReason' (type: Network.ErrorReason) -> Causes the request to fail with the given reason.
No return value.
Description: Causes the request to fail with specified reason.
- Fetch_fulfillRequest(self, requestId, responseCode, **kwargs)
- Function path: Fetch.fulfillRequest
Domain: Fetch
Method name: fulfillRequest
Parameters:
Required arguments:
'requestId' (type: RequestId) -> An id the client received in requestPaused event.
'responseCode' (type: integer) -> An HTTP response code.
Optional arguments:
'responseHeaders' (type: array) -> Response headers.
'binaryResponseHeaders' (type: string) -> Alternative way of specifying response headers as a \0-separated
series of name: value pairs. Prefer the above method unless you
need to represent some non-UTF8 values that can't be transmitted
over the protocol as text. (Encoded as a base64 string when passed over JSON)
'body' (type: string) -> A response body. (Encoded as a base64 string when passed over JSON)
'responsePhrase' (type: string) -> A textual representation of responseCode.
If absent, a standard phrase matching responseCode is used.
No return value.
Description: Provides response to the request.
- Fetch_getResponseBody(self, requestId)
- Function path: Fetch.getResponseBody
Domain: Fetch
Method name: getResponseBody
Parameters:
Required arguments:
'requestId' (type: RequestId) -> Identifier for the intercepted request to get body for.
Returns:
'body' (type: string) -> Response body.
'base64Encoded' (type: boolean) -> True, if content was sent as base64.
Description: Causes the body of the response to be received from the server and
returned as a single string. May only be issued for a request that
is paused in the Response stage and is mutually exclusive with
takeResponseBodyForInterceptionAsStream. Calling other methods that
affect the request or disabling fetch domain before body is received
results in an undefined behavior.
- Fetch_takeResponseBodyAsStream(self, requestId)
- Function path: Fetch.takeResponseBodyAsStream
Domain: Fetch
Method name: takeResponseBodyAsStream
Parameters:
Required arguments:
'requestId' (type: RequestId) -> No description
Returns:
'stream' (type: IO.StreamHandle) -> No description
Description: Returns a handle to the stream representing the response body.
The request must be paused in the HeadersReceived stage.
Note that after this command the request can't be continued
as is -- client either needs to cancel it or to provide the
response body.
The stream only supports sequential read, IO.read will fail if the position
is specified.
This method is mutually exclusive with getResponseBody.
Calling other methods that affect the request or disabling fetch
domain before body is received results in an undefined behavior.
- HeadlessExperimental_beginFrame(self, **kwargs)
- Function path: HeadlessExperimental.beginFrame
Domain: HeadlessExperimental
Method name: beginFrame
Parameters:
Optional arguments:
'frameTimeTicks' (type: number) -> Timestamp of this BeginFrame in Renderer TimeTicks (milliseconds of uptime). If not set,
the current time will be used.
'interval' (type: number) -> The interval between BeginFrames that is reported to the compositor, in milliseconds.
Defaults to a 60 frames/second interval, i.e. about 16.666 milliseconds.
'noDisplayUpdates' (type: boolean) -> Whether updates should not be committed and drawn onto the display. False by default. If
true, only side effects of the BeginFrame will be run, such as layout and animations, but
any visual updates may not be visible on the display or in screenshots.
'screenshot' (type: ScreenshotParams) -> If set, a screenshot of the frame will be captured and returned in the response. Otherwise,
no screenshot will be captured. Note that capturing a screenshot can fail, for example,
during renderer initialization. In such a case, no screenshot data will be returned.
Returns:
'hasDamage' (type: boolean) -> Whether the BeginFrame resulted in damage and, thus, a new frame was committed to the
display. Reported for diagnostic uses, may be removed in the future.
'screenshotData' (type: string) -> Base64-encoded image data of the screenshot, if one was requested and successfully taken. (Encoded as a base64 string when passed over JSON)
Description: Sends a BeginFrame to the target and returns when the frame was completed. Optionally captures a
screenshot from the resulting frame. Requires that the target was created with enabled
BeginFrameControl. Designed for use with --run-all-compositor-stages-before-draw, see also
https://goo.gl/3zHXhB for more background.
- HeadlessExperimental_disable(self)
- Function path: HeadlessExperimental.disable
Domain: HeadlessExperimental
Method name: disable
No return value.
Description: Disables headless events for the target.
- HeadlessExperimental_enable(self)
- Function path: HeadlessExperimental.enable
Domain: HeadlessExperimental
Method name: enable
No return value.
Description: Enables headless events for the target.
- HeapProfiler_addInspectedHeapObject(self, heapObjectId)
- Function path: HeapProfiler.addInspectedHeapObject
Domain: HeapProfiler
Method name: addInspectedHeapObject
Parameters:
Required arguments:
'heapObjectId' (type: HeapSnapshotObjectId) -> Heap snapshot object id to be accessible by means of $x command line API.
No return value.
Description: Enables console to refer to the node with given id via $x (see Command Line API for more details
$x functions).
- HeapProfiler_collectGarbage(self)
- Function path: HeapProfiler.collectGarbage
Domain: HeapProfiler
Method name: collectGarbage
No return value.
- HeapProfiler_disable(self)
- Function path: HeapProfiler.disable
Domain: HeapProfiler
Method name: disable
No return value.
- HeapProfiler_enable(self)
- Function path: HeapProfiler.enable
Domain: HeapProfiler
Method name: enable
No return value.
- HeapProfiler_getHeapObjectId(self, objectId)
- Function path: HeapProfiler.getHeapObjectId
Domain: HeapProfiler
Method name: getHeapObjectId
Parameters:
Required arguments:
'objectId' (type: Runtime.RemoteObjectId) -> Identifier of the object to get heap object id for.
Returns:
'heapSnapshotObjectId' (type: HeapSnapshotObjectId) -> Id of the heap snapshot object corresponding to the passed remote object id.
- HeapProfiler_getObjectByHeapObjectId(self, objectId, **kwargs)
- Function path: HeapProfiler.getObjectByHeapObjectId
Domain: HeapProfiler
Method name: getObjectByHeapObjectId
Parameters:
Required arguments:
'objectId' (type: HeapSnapshotObjectId) -> No description
Optional arguments:
'objectGroup' (type: string) -> Symbolic group name that can be used to release multiple objects.
Returns:
'result' (type: Runtime.RemoteObject) -> Evaluation result.
- HeapProfiler_getSamplingProfile(self)
- Function path: HeapProfiler.getSamplingProfile
Domain: HeapProfiler
Method name: getSamplingProfile
Returns:
'profile' (type: SamplingHeapProfile) -> Return the sampling profile being collected.
- HeapProfiler_startSampling(self, **kwargs)
- Function path: HeapProfiler.startSampling
Domain: HeapProfiler
Method name: startSampling
Parameters:
Optional arguments:
'samplingInterval' (type: number) -> Average sample interval in bytes. Poisson distribution is used for the intervals. The
default value is 32768 bytes.
No return value.
- HeapProfiler_startTrackingHeapObjects(self, **kwargs)
- Function path: HeapProfiler.startTrackingHeapObjects
Domain: HeapProfiler
Method name: startTrackingHeapObjects
Parameters:
Optional arguments:
'trackAllocations' (type: boolean) -> No description
No return value.
- HeapProfiler_stopSampling(self)
- Function path: HeapProfiler.stopSampling
Domain: HeapProfiler
Method name: stopSampling
Returns:
'profile' (type: SamplingHeapProfile) -> Recorded sampling heap profile.
- HeapProfiler_stopTrackingHeapObjects(self, **kwargs)
- Function path: HeapProfiler.stopTrackingHeapObjects
Domain: HeapProfiler
Method name: stopTrackingHeapObjects
Parameters:
Optional arguments:
'reportProgress' (type: boolean) -> If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken
when the tracking is stopped.
'treatGlobalObjectsAsRoots' (type: boolean) -> No description
No return value.
- HeapProfiler_takeHeapSnapshot(self, **kwargs)
- Function path: HeapProfiler.takeHeapSnapshot
Domain: HeapProfiler
Method name: takeHeapSnapshot
Parameters:
Optional arguments:
'reportProgress' (type: boolean) -> If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken.
'treatGlobalObjectsAsRoots' (type: boolean) -> If true, a raw snapshot without artifical roots will be generated
No return value.
- IO_close(self, handle)
- Function path: IO.close
Domain: IO
Method name: close
Parameters:
Required arguments:
'handle' (type: StreamHandle) -> Handle of the stream to close.
No return value.
Description: Close the stream, discard any temporary backing storage.
- IO_read(self, handle, **kwargs)
- Function path: IO.read
Domain: IO
Method name: read
Parameters:
Required arguments:
'handle' (type: StreamHandle) -> Handle of the stream to read.
Optional arguments:
'offset' (type: integer) -> Seek to the specified offset before reading (if not specificed, proceed with offset
following the last read). Some types of streams may only support sequential reads.
'size' (type: integer) -> Maximum number of bytes to read (left upon the agent discretion if not specified).
Returns:
'base64Encoded' (type: boolean) -> Set if the data is base64-encoded
'data' (type: string) -> Data that were read.
'eof' (type: boolean) -> Set if the end-of-file condition occurred while reading.
Description: Read a chunk of the stream
- IO_resolveBlob(self, objectId)
- Function path: IO.resolveBlob
Domain: IO
Method name: resolveBlob
Parameters:
Required arguments:
'objectId' (type: Runtime.RemoteObjectId) -> Object id of a Blob object wrapper.
Returns:
'uuid' (type: string) -> UUID of the specified Blob.
Description: Return UUID of Blob object specified by a remote object id.
- IndexedDB_clearObjectStore(self, securityOrigin, databaseName, objectStoreName)
- Function path: IndexedDB.clearObjectStore
Domain: IndexedDB
Method name: clearObjectStore
Parameters:
Required arguments:
'securityOrigin' (type: string) -> Security origin.
'databaseName' (type: string) -> Database name.
'objectStoreName' (type: string) -> Object store name.
No return value.
Description: Clears all entries from an object store.
- IndexedDB_deleteDatabase(self, securityOrigin, databaseName)
- Function path: IndexedDB.deleteDatabase
Domain: IndexedDB
Method name: deleteDatabase
Parameters:
Required arguments:
'securityOrigin' (type: string) -> Security origin.
'databaseName' (type: string) -> Database name.
No return value.
Description: Deletes a database.
- IndexedDB_deleteObjectStoreEntries(self, securityOrigin, databaseName, objectStoreName, keyRange)
- Function path: IndexedDB.deleteObjectStoreEntries
Domain: IndexedDB
Method name: deleteObjectStoreEntries
Parameters:
Required arguments:
'securityOrigin' (type: string) -> No description
'databaseName' (type: string) -> No description
'objectStoreName' (type: string) -> No description
'keyRange' (type: KeyRange) -> Range of entry keys to delete
No return value.
Description: Delete a range of entries from an object store
- IndexedDB_disable(self)
- Function path: IndexedDB.disable
Domain: IndexedDB
Method name: disable
No return value.
Description: Disables events from backend.
- IndexedDB_enable(self)
- Function path: IndexedDB.enable
Domain: IndexedDB
Method name: enable
No return value.
Description: Enables events from backend.
- IndexedDB_getMetadata(self, securityOrigin, databaseName, objectStoreName)
- Function path: IndexedDB.getMetadata
Domain: IndexedDB
Method name: getMetadata
Parameters:
Required arguments:
'securityOrigin' (type: string) -> Security origin.
'databaseName' (type: string) -> Database name.
'objectStoreName' (type: string) -> Object store name.
Returns:
'entriesCount' (type: number) -> the entries count
'keyGeneratorValue' (type: number) -> the current value of key generator, to become the next inserted
key into the object store. Valid if objectStore.autoIncrement
is true.
Description: Gets metadata of an object store
- IndexedDB_requestData(self, securityOrigin, databaseName, objectStoreName, indexName, skipCount, pageSize, **kwargs)
- Function path: IndexedDB.requestData
Domain: IndexedDB
Method name: requestData
Parameters:
Required arguments:
'securityOrigin' (type: string) -> Security origin.
'databaseName' (type: string) -> Database name.
'objectStoreName' (type: string) -> Object store name.
'indexName' (type: string) -> Index name, empty string for object store data requests.
'skipCount' (type: integer) -> Number of records to skip.
'pageSize' (type: integer) -> Number of records to fetch.
Optional arguments:
'keyRange' (type: KeyRange) -> Key range.
Returns:
'objectStoreDataEntries' (type: array) -> Array of object store data entries.
'hasMore' (type: boolean) -> If true, there are more entries to fetch in the given range.
Description: Requests data from object store or index.
- IndexedDB_requestDatabase(self, securityOrigin, databaseName)
- Function path: IndexedDB.requestDatabase
Domain: IndexedDB
Method name: requestDatabase
Parameters:
Required arguments:
'securityOrigin' (type: string) -> Security origin.
'databaseName' (type: string) -> Database name.
Returns:
'databaseWithObjectStores' (type: DatabaseWithObjectStores) -> Database with an array of object stores.
Description: Requests database with given name in given frame.
- IndexedDB_requestDatabaseNames(self, securityOrigin)
- Function path: IndexedDB.requestDatabaseNames
Domain: IndexedDB
Method name: requestDatabaseNames
Parameters:
Required arguments:
'securityOrigin' (type: string) -> Security origin.
Returns:
'databaseNames' (type: array) -> Database names for origin.
Description: Requests database names for given security origin.
- Input_dispatchDragEvent(self, type, x, y, data, **kwargs)
- Function path: Input.dispatchDragEvent
Domain: Input
Method name: dispatchDragEvent
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'type' (type: string) -> Type of the drag event.
'x' (type: number) -> X coordinate of the event relative to the main frame's viewport in CSS pixels.
'y' (type: number) -> Y coordinate of the event relative to the main frame's viewport in CSS pixels. 0 refers to
the top of the viewport and Y increases as it proceeds towards the bottom of the viewport.
'data' (type: DragData) -> No description
Optional arguments:
'modifiers' (type: integer) -> Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8
(default: 0).
No return value.
Description: Dispatches a drag event into the page.
- Input_dispatchKeyEvent(self, type, **kwargs)
- Function path: Input.dispatchKeyEvent
Domain: Input
Method name: dispatchKeyEvent
Parameters:
Required arguments:
'type' (type: string) -> Type of the key event.
Optional arguments:
'modifiers' (type: integer) -> Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8
(default: 0).
'timestamp' (type: TimeSinceEpoch) -> Time at which the event occurred.
'text' (type: string) -> Text as generated by processing a virtual key code with a keyboard layout. Not needed for
for `keyUp` and `rawKeyDown` events (default: "")
'unmodifiedText' (type: string) -> Text that would have been generated by the keyboard if no modifiers were pressed (except for
shift). Useful for shortcut (accelerator) key handling (default: "").
'keyIdentifier' (type: string) -> Unique key identifier (e.g., 'U+0041') (default: "").
'code' (type: string) -> Unique DOM defined string value for each physical key (e.g., 'KeyA') (default: "").
'key' (type: string) -> Unique DOM defined string value describing the meaning of the key in the context of active
modifiers, keyboard layout, etc (e.g., 'AltGr') (default: "").
'windowsVirtualKeyCode' (type: integer) -> Windows virtual key code (default: 0).
'nativeVirtualKeyCode' (type: integer) -> Native virtual key code (default: 0).
'autoRepeat' (type: boolean) -> Whether the event was generated from auto repeat (default: false).
'isKeypad' (type: boolean) -> Whether the event was generated from the keypad (default: false).
'isSystemKey' (type: boolean) -> Whether the event was a system key event (default: false).
'location' (type: integer) -> Whether the event was from the left or right side of the keyboard. 1=Left, 2=Right (default:
0).
'commands' (type: array) -> Editing commands to send with the key event (e.g., 'selectAll') (default: []).
These are related to but not equal the command names used in `document.execCommand` and NSStandardKeyBindingResponding.
See https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/renderer/core/editing/commands/editor_command_names.h for valid command names.
No return value.
Description: Dispatches a key event to the page.
- Input_dispatchMouseEvent(self, type, x, y, **kwargs)
- Function path: Input.dispatchMouseEvent
Domain: Input
Method name: dispatchMouseEvent
Parameters:
Required arguments:
'type' (type: string) -> Type of the mouse event.
'x' (type: number) -> X coordinate of the event relative to the main frame's viewport in CSS pixels.
'y' (type: number) -> Y coordinate of the event relative to the main frame's viewport in CSS pixels. 0 refers to
the top of the viewport and Y increases as it proceeds towards the bottom of the viewport.
Optional arguments:
'modifiers' (type: integer) -> Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8
(default: 0).
'timestamp' (type: TimeSinceEpoch) -> Time at which the event occurred.
'button' (type: MouseButton) -> Mouse button (default: "none").
'buttons' (type: integer) -> A number indicating which buttons are pressed on the mouse when a mouse event is triggered.
Left=1, Right=2, Middle=4, Back=8, Forward=16, None=0.
'clickCount' (type: integer) -> Number of times the mouse button was clicked (default: 0).
'force' (type: number) -> The normalized pressure, which has a range of [0,1] (default: 0).
'tangentialPressure' (type: number) -> The normalized tangential pressure, which has a range of [-1,1] (default: 0).
'tiltX' (type: integer) -> The plane angle between the Y-Z plane and the plane containing both the stylus axis and the Y axis, in degrees of the range [-90,90], a positive tiltX is to the right (default: 0).
'tiltY' (type: integer) -> The plane angle between the X-Z plane and the plane containing both the stylus axis and the X axis, in degrees of the range [-90,90], a positive tiltY is towards the user (default: 0).
'twist' (type: integer) -> The clockwise rotation of a pen stylus around its own major axis, in degrees in the range [0,359] (default: 0).
'deltaX' (type: number) -> X delta in CSS pixels for mouse wheel event (default: 0).
'deltaY' (type: number) -> Y delta in CSS pixels for mouse wheel event (default: 0).
'pointerType' (type: string) -> Pointer type (default: "mouse").
No return value.
Description: Dispatches a mouse event to the page.
- Input_dispatchTouchEvent(self, type, touchPoints, **kwargs)
- Function path: Input.dispatchTouchEvent
Domain: Input
Method name: dispatchTouchEvent
Parameters:
Required arguments:
'type' (type: string) -> Type of the touch event. TouchEnd and TouchCancel must not contain any touch points, while
TouchStart and TouchMove must contains at least one.
'touchPoints' (type: array) -> Active touch points on the touch device. One event per any changed point (compared to
previous touch event in a sequence) is generated, emulating pressing/moving/releasing points
one by one.
Optional arguments:
'modifiers' (type: integer) -> Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8
(default: 0).
'timestamp' (type: TimeSinceEpoch) -> Time at which the event occurred.
No return value.
Description: Dispatches a touch event to the page.
- Input_emulateTouchFromMouseEvent(self, type, x, y, button, **kwargs)
- Function path: Input.emulateTouchFromMouseEvent
Domain: Input
Method name: emulateTouchFromMouseEvent
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'type' (type: string) -> Type of the mouse event.
'x' (type: integer) -> X coordinate of the mouse pointer in DIP.
'y' (type: integer) -> Y coordinate of the mouse pointer in DIP.
'button' (type: MouseButton) -> Mouse button. Only "none", "left", "right" are supported.
Optional arguments:
'timestamp' (type: TimeSinceEpoch) -> Time at which the event occurred (default: current time).
'deltaX' (type: number) -> X delta in DIP for mouse wheel event (default: 0).
'deltaY' (type: number) -> Y delta in DIP for mouse wheel event (default: 0).
'modifiers' (type: integer) -> Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8
(default: 0).
'clickCount' (type: integer) -> Number of times the mouse button was clicked (default: 0).
No return value.
Description: Emulates touch event from the mouse event parameters.
- Input_imeSetComposition(self, text, selectionStart, selectionEnd, **kwargs)
- Function path: Input.imeSetComposition
Domain: Input
Method name: imeSetComposition
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'text' (type: string) -> The text to insert
'selectionStart' (type: integer) -> selection start
'selectionEnd' (type: integer) -> selection end
Optional arguments:
'replacementStart' (type: integer) -> replacement start
'replacementEnd' (type: integer) -> replacement end
No return value.
Description: This method sets the current candidate text for ime.
Use imeCommitComposition to commit the final text.
Use imeSetComposition with empty string as text to cancel composition.
- Input_insertText(self, text)
- Function path: Input.insertText
Domain: Input
Method name: insertText
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'text' (type: string) -> The text to insert.
No return value.
Description: This method emulates inserting text that doesn't come from a key press,
for example an emoji keyboard or an IME.
- Input_setIgnoreInputEvents(self, ignore)
- Function path: Input.setIgnoreInputEvents
Domain: Input
Method name: setIgnoreInputEvents
Parameters:
Required arguments:
'ignore' (type: boolean) -> Ignores input events processing when set to true.
No return value.
Description: Ignores input events (useful while auditing page).
- Input_setInterceptDrags(self, enabled)
- Function path: Input.setInterceptDrags
Domain: Input
Method name: setInterceptDrags
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'enabled' (type: boolean) -> No description
No return value.
Description: Prevents default drag and drop behavior and instead emits `Input.dragIntercepted` events.
Drag and drop behavior can be directly controlled via `Input.dispatchDragEvent`.
- Input_synthesizePinchGesture(self, x, y, scaleFactor, **kwargs)
- Function path: Input.synthesizePinchGesture
Domain: Input
Method name: synthesizePinchGesture
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'x' (type: number) -> X coordinate of the start of the gesture in CSS pixels.
'y' (type: number) -> Y coordinate of the start of the gesture in CSS pixels.
'scaleFactor' (type: number) -> Relative scale factor after zooming (>1.0 zooms in, <1.0 zooms out).
Optional arguments:
'relativeSpeed' (type: integer) -> Relative pointer speed in pixels per second (default: 800).
'gestureSourceType' (type: GestureSourceType) -> Which type of input events to be generated (default: 'default', which queries the platform
for the preferred input type).
No return value.
Description: Synthesizes a pinch gesture over a time period by issuing appropriate touch events.
- Input_synthesizeScrollGesture(self, x, y, **kwargs)
- Function path: Input.synthesizeScrollGesture
Domain: Input
Method name: synthesizeScrollGesture
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'x' (type: number) -> X coordinate of the start of the gesture in CSS pixels.
'y' (type: number) -> Y coordinate of the start of the gesture in CSS pixels.
Optional arguments:
'xDistance' (type: number) -> The distance to scroll along the X axis (positive to scroll left).
'yDistance' (type: number) -> The distance to scroll along the Y axis (positive to scroll up).
'xOverscroll' (type: number) -> The number of additional pixels to scroll back along the X axis, in addition to the given
distance.
'yOverscroll' (type: number) -> The number of additional pixels to scroll back along the Y axis, in addition to the given
distance.
'preventFling' (type: boolean) -> Prevent fling (default: true).
'speed' (type: integer) -> Swipe speed in pixels per second (default: 800).
'gestureSourceType' (type: GestureSourceType) -> Which type of input events to be generated (default: 'default', which queries the platform
for the preferred input type).
'repeatCount' (type: integer) -> The number of times to repeat the gesture (default: 0).
'repeatDelayMs' (type: integer) -> The number of milliseconds delay between each repeat. (default: 250).
'interactionMarkerName' (type: string) -> The name of the interaction markers to generate, if not empty (default: "").
No return value.
Description: Synthesizes a scroll gesture over a time period by issuing appropriate touch events.
- Input_synthesizeTapGesture(self, x, y, **kwargs)
- Function path: Input.synthesizeTapGesture
Domain: Input
Method name: synthesizeTapGesture
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'x' (type: number) -> X coordinate of the start of the gesture in CSS pixels.
'y' (type: number) -> Y coordinate of the start of the gesture in CSS pixels.
Optional arguments:
'duration' (type: integer) -> Duration between touchdown and touchup events in ms (default: 50).
'tapCount' (type: integer) -> Number of times to perform the tap (e.g. 2 for double tap, default: 1).
'gestureSourceType' (type: GestureSourceType) -> Which type of input events to be generated (default: 'default', which queries the platform
for the preferred input type).
No return value.
Description: Synthesizes a tap gesture over a time period by issuing appropriate touch events.
- Inspector_disable(self)
- Function path: Inspector.disable
Domain: Inspector
Method name: disable
No return value.
Description: Disables inspector domain notifications.
- Inspector_enable(self)
- Function path: Inspector.enable
Domain: Inspector
Method name: enable
No return value.
Description: Enables inspector domain notifications.
- LayerTree_compositingReasons(self, layerId)
- Function path: LayerTree.compositingReasons
Domain: LayerTree
Method name: compositingReasons
Parameters:
Required arguments:
'layerId' (type: LayerId) -> The id of the layer for which we want to get the reasons it was composited.
Returns:
'compositingReasons' (type: array) -> A list of strings specifying reasons for the given layer to become composited.
'compositingReasonIds' (type: array) -> A list of strings specifying reason IDs for the given layer to become composited.
Description: Provides the reasons why the given layer was composited.
- LayerTree_disable(self)
- Function path: LayerTree.disable
Domain: LayerTree
Method name: disable
No return value.
Description: Disables compositing tree inspection.
- LayerTree_enable(self)
- Function path: LayerTree.enable
Domain: LayerTree
Method name: enable
No return value.
Description: Enables compositing tree inspection.
- LayerTree_loadSnapshot(self, tiles)
- Function path: LayerTree.loadSnapshot
Domain: LayerTree
Method name: loadSnapshot
Parameters:
Required arguments:
'tiles' (type: array) -> An array of tiles composing the snapshot.
Returns:
'snapshotId' (type: SnapshotId) -> The id of the snapshot.
Description: Returns the snapshot identifier.
- LayerTree_makeSnapshot(self, layerId)
- Function path: LayerTree.makeSnapshot
Domain: LayerTree
Method name: makeSnapshot
Parameters:
Required arguments:
'layerId' (type: LayerId) -> The id of the layer.
Returns:
'snapshotId' (type: SnapshotId) -> The id of the layer snapshot.
Description: Returns the layer snapshot identifier.
- LayerTree_profileSnapshot(self, snapshotId, **kwargs)
- Function path: LayerTree.profileSnapshot
Domain: LayerTree
Method name: profileSnapshot
Parameters:
Required arguments:
'snapshotId' (type: SnapshotId) -> The id of the layer snapshot.
Optional arguments:
'minRepeatCount' (type: integer) -> The maximum number of times to replay the snapshot (1, if not specified).
'minDuration' (type: number) -> The minimum duration (in seconds) to replay the snapshot.
'clipRect' (type: DOM.Rect) -> The clip rectangle to apply when replaying the snapshot.
Returns:
'timings' (type: array) -> The array of paint profiles, one per run.
- LayerTree_releaseSnapshot(self, snapshotId)
- Function path: LayerTree.releaseSnapshot
Domain: LayerTree
Method name: releaseSnapshot
Parameters:
Required arguments:
'snapshotId' (type: SnapshotId) -> The id of the layer snapshot.
No return value.
Description: Releases layer snapshot captured by the back-end.
- LayerTree_replaySnapshot(self, snapshotId, **kwargs)
- Function path: LayerTree.replaySnapshot
Domain: LayerTree
Method name: replaySnapshot
Parameters:
Required arguments:
'snapshotId' (type: SnapshotId) -> The id of the layer snapshot.
Optional arguments:
'fromStep' (type: integer) -> The first step to replay from (replay from the very start if not specified).
'toStep' (type: integer) -> The last step to replay to (replay till the end if not specified).
'scale' (type: number) -> The scale to apply while replaying (defaults to 1).
Returns:
'dataURL' (type: string) -> A data: URL for resulting image.
Description: Replays the layer snapshot and returns the resulting bitmap.
- LayerTree_snapshotCommandLog(self, snapshotId)
- Function path: LayerTree.snapshotCommandLog
Domain: LayerTree
Method name: snapshotCommandLog
Parameters:
Required arguments:
'snapshotId' (type: SnapshotId) -> The id of the layer snapshot.
Returns:
'commandLog' (type: array) -> The array of canvas function calls.
Description: Replays the layer snapshot and returns canvas log.
- Log_clear(self)
- Function path: Log.clear
Domain: Log
Method name: clear
No return value.
Description: Clears the log.
- Log_disable(self)
- Function path: Log.disable
Domain: Log
Method name: disable
No return value.
Description: Disables log domain, prevents further log entries from being reported to the client.
- Log_enable(self)
- Function path: Log.enable
Domain: Log
Method name: enable
No return value.
Description: Enables log domain, sends the entries collected so far to the client by means of the
`entryAdded` notification.
- Log_startViolationsReport(self, config)
- Function path: Log.startViolationsReport
Domain: Log
Method name: startViolationsReport
Parameters:
Required arguments:
'config' (type: array) -> Configuration for violations.
No return value.
Description: start violation reporting.
- Log_stopViolationsReport(self)
- Function path: Log.stopViolationsReport
Domain: Log
Method name: stopViolationsReport
No return value.
Description: Stop violation reporting.
- Media_disable(self)
- Function path: Media.disable
Domain: Media
Method name: disable
No return value.
Description: Disables the Media domain.
- Media_enable(self)
- Function path: Media.enable
Domain: Media
Method name: enable
No return value.
Description: Enables the Media domain
- Memory_forciblyPurgeJavaScriptMemory(self)
- Function path: Memory.forciblyPurgeJavaScriptMemory
Domain: Memory
Method name: forciblyPurgeJavaScriptMemory
No return value.
Description: Simulate OomIntervention by purging V8 memory.
- Memory_getAllTimeSamplingProfile(self)
- Function path: Memory.getAllTimeSamplingProfile
Domain: Memory
Method name: getAllTimeSamplingProfile
Returns:
'profile' (type: SamplingProfile) -> No description
Description: Retrieve native memory allocations profile
collected since renderer process startup.
- Memory_getBrowserSamplingProfile(self)
- Function path: Memory.getBrowserSamplingProfile
Domain: Memory
Method name: getBrowserSamplingProfile
Returns:
'profile' (type: SamplingProfile) -> No description
Description: Retrieve native memory allocations profile
collected since browser process startup.
- Memory_getDOMCounters(self)
- Function path: Memory.getDOMCounters
Domain: Memory
Method name: getDOMCounters
Returns:
'documents' (type: integer) -> No description
'nodes' (type: integer) -> No description
'jsEventListeners' (type: integer) -> No description
- Memory_getSamplingProfile(self)
- Function path: Memory.getSamplingProfile
Domain: Memory
Method name: getSamplingProfile
Returns:
'profile' (type: SamplingProfile) -> No description
Description: Retrieve native memory allocations profile collected since last
`startSampling` call.
- Memory_prepareForLeakDetection(self)
- Function path: Memory.prepareForLeakDetection
Domain: Memory
Method name: prepareForLeakDetection
No return value.
- Memory_setPressureNotificationsSuppressed(self, suppressed)
- Function path: Memory.setPressureNotificationsSuppressed
Domain: Memory
Method name: setPressureNotificationsSuppressed
Parameters:
Required arguments:
'suppressed' (type: boolean) -> If true, memory pressure notifications will be suppressed.
No return value.
Description: Enable/disable suppressing memory pressure notifications in all processes.
- Memory_simulatePressureNotification(self, level)
- Function path: Memory.simulatePressureNotification
Domain: Memory
Method name: simulatePressureNotification
Parameters:
Required arguments:
'level' (type: PressureLevel) -> Memory pressure level of the notification.
No return value.
Description: Simulate a memory pressure notification in all processes.
- Memory_startSampling(self, **kwargs)
- Function path: Memory.startSampling
Domain: Memory
Method name: startSampling
Parameters:
Optional arguments:
'samplingInterval' (type: integer) -> Average number of bytes between samples.
'suppressRandomness' (type: boolean) -> Do not randomize intervals between samples.
No return value.
Description: Start collecting native memory profile.
- Memory_stopSampling(self)
- Function path: Memory.stopSampling
Domain: Memory
Method name: stopSampling
No return value.
Description: Stop collecting native memory profile.
- Network_canClearBrowserCache(self)
- Function path: Network.canClearBrowserCache
Domain: Network
Method name: canClearBrowserCache
Returns:
'result' (type: boolean) -> True if browser cache can be cleared.
Description: Tells whether clearing browser cache is supported.
- Network_canClearBrowserCookies(self)
- Function path: Network.canClearBrowserCookies
Domain: Network
Method name: canClearBrowserCookies
Returns:
'result' (type: boolean) -> True if browser cookies can be cleared.
Description: Tells whether clearing browser cookies is supported.
- Network_canEmulateNetworkConditions(self)
- Function path: Network.canEmulateNetworkConditions
Domain: Network
Method name: canEmulateNetworkConditions
Returns:
'result' (type: boolean) -> True if emulation of network conditions is supported.
Description: Tells whether emulation of network conditions is supported.
- Network_clearAcceptedEncodingsOverride(self)
- Function path: Network.clearAcceptedEncodingsOverride
Domain: Network
Method name: clearAcceptedEncodingsOverride
WARNING: This function is marked 'Experimental'!
No return value.
Description: Clears accepted encodings set by setAcceptedEncodings
- Network_clearBrowserCache(self)
- Function path: Network.clearBrowserCache
Domain: Network
Method name: clearBrowserCache
No return value.
Description: Clears browser cache.
- Network_clearBrowserCookies(self)
- Function path: Network.clearBrowserCookies
Domain: Network
Method name: clearBrowserCookies
No return value.
Description: Clears browser cookies.
- Network_continueInterceptedRequest(self, interceptionId, **kwargs)
- Function path: Network.continueInterceptedRequest
Domain: Network
Method name: continueInterceptedRequest
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'interceptionId' (type: InterceptionId) -> No description
Optional arguments:
'errorReason' (type: ErrorReason) -> If set this causes the request to fail with the given reason. Passing `Aborted` for requests
marked with `isNavigationRequest` also cancels the navigation. Must not be set in response
to an authChallenge.
'rawResponse' (type: string) -> If set the requests completes using with the provided base64 encoded raw response, including
HTTP status line and headers etc... Must not be set in response to an authChallenge. (Encoded as a base64 string when passed over JSON)
'url' (type: string) -> If set the request url will be modified in a way that's not observable by page. Must not be
set in response to an authChallenge.
'method' (type: string) -> If set this allows the request method to be overridden. Must not be set in response to an
authChallenge.
'postData' (type: string) -> If set this allows postData to be set. Must not be set in response to an authChallenge.
'headers' (type: Headers) -> If set this allows the request headers to be changed. Must not be set in response to an
authChallenge.
'authChallengeResponse' (type: AuthChallengeResponse) -> Response to a requestIntercepted with an authChallenge. Must not be set otherwise.
No return value.
Description: Response to Network.requestIntercepted which either modifies the request to continue with any
modifications, or blocks it, or completes it with the provided response bytes. If a network
fetch occurs as a result which encounters a redirect an additional Network.requestIntercepted
event will be sent with the same InterceptionId.
Deprecated, use Fetch.continueRequest, Fetch.fulfillRequest and Fetch.failRequest instead.
- Network_deleteCookies(self, name, **kwargs)
- Function path: Network.deleteCookies
Domain: Network
Method name: deleteCookies
Parameters:
Required arguments:
'name' (type: string) -> Name of the cookies to remove.
Optional arguments:
'url' (type: string) -> If specified, deletes all the cookies with the given name where domain and path match
provided URL.
'domain' (type: string) -> If specified, deletes only cookies with the exact domain.
'path' (type: string) -> If specified, deletes only cookies with the exact path.
No return value.
Description: Deletes browser cookies with matching name and url or domain/path pair.
- Network_disable(self)
- Function path: Network.disable
Domain: Network
Method name: disable
No return value.
Description: Disables network tracking, prevents network events from being sent to the client.
- Network_emulateNetworkConditions(self, offline, latency, downloadThroughput, uploadThroughput, **kwargs)
- Function path: Network.emulateNetworkConditions
Domain: Network
Method name: emulateNetworkConditions
Parameters:
Required arguments:
'offline' (type: boolean) -> True to emulate internet disconnection.
'latency' (type: number) -> Minimum latency from request sent to response headers received (ms).
'downloadThroughput' (type: number) -> Maximal aggregated download throughput (bytes/sec). -1 disables download throttling.
'uploadThroughput' (type: number) -> Maximal aggregated upload throughput (bytes/sec). -1 disables upload throttling.
Optional arguments:
'connectionType' (type: ConnectionType) -> Connection type if known.
No return value.
Description: Activates emulation of network conditions.
- Network_enable(self, **kwargs)
- Function path: Network.enable
Domain: Network
Method name: enable
Parameters:
Optional arguments:
'maxTotalBufferSize' (type: integer) -> Buffer size in bytes to use when preserving network payloads (XHRs, etc).
'maxResourceBufferSize' (type: integer) -> Per-resource buffer size in bytes to use when preserving network payloads (XHRs, etc).
'maxPostDataSize' (type: integer) -> Longest post body size (in bytes) that would be included in requestWillBeSent notification
No return value.
Description: Enables network tracking, network events will now be delivered to the client.
- Network_getAllCookies(self)
- Function path: Network.getAllCookies
Domain: Network
Method name: getAllCookies
Returns:
'cookies' (type: array) -> Array of cookie objects.
Description: Returns all browser cookies. Depending on the backend support, will return detailed cookie
information in the `cookies` field.
- Network_getCertificate(self, origin)
- Function path: Network.getCertificate
Domain: Network
Method name: getCertificate
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'origin' (type: string) -> Origin to get certificate for.
Returns:
'tableNames' (type: array) -> No description
Description: Returns the DER-encoded certificate.
- Network_getCookies(self, **kwargs)
- Function path: Network.getCookies
Domain: Network
Method name: getCookies
Parameters:
Optional arguments:
'urls' (type: array) -> The list of URLs for which applicable cookies will be fetched.
If not specified, it's assumed to be set to the list containing
the URLs of the page and all of its subframes.
Returns:
'cookies' (type: array) -> Array of cookie objects.
Description: Returns all browser cookies for the current URL. Depending on the backend support, will return
detailed cookie information in the `cookies` field.
- Network_getRequestPostData(self, requestId)
- Function path: Network.getRequestPostData
Domain: Network
Method name: getRequestPostData
Parameters:
Required arguments:
'requestId' (type: RequestId) -> Identifier of the network request to get content for.
Returns:
'postData' (type: string) -> Request body string, omitting files from multipart requests
Description: Returns post data sent with the request. Returns an error when no data was sent with the request.
- Network_getResponseBody(self, requestId)
- Function path: Network.getResponseBody
Domain: Network
Method name: getResponseBody
Parameters:
Required arguments:
'requestId' (type: RequestId) -> Identifier of the network request to get content for.
Returns:
'body' (type: string) -> Response body.
'base64Encoded' (type: boolean) -> True, if content was sent as base64.
Description: Returns content served for the given request.
- Network_getResponseBodyForInterception(self, interceptionId)
- Function path: Network.getResponseBodyForInterception
Domain: Network
Method name: getResponseBodyForInterception
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'interceptionId' (type: InterceptionId) -> Identifier for the intercepted request to get body for.
Returns:
'body' (type: string) -> Response body.
'base64Encoded' (type: boolean) -> True, if content was sent as base64.
Description: Returns content served for the given currently intercepted request.
- Network_getSecurityIsolationStatus(self, **kwargs)
- Function path: Network.getSecurityIsolationStatus
Domain: Network
Method name: getSecurityIsolationStatus
WARNING: This function is marked 'Experimental'!
Parameters:
Optional arguments:
'frameId' (type: Page.FrameId) -> If no frameId is provided, the status of the target is provided.
Returns:
'status' (type: SecurityIsolationStatus) -> No description
Description: Returns information about the COEP/COOP isolation status.
- Network_loadNetworkResource(self, frameId, url, options)
- Function path: Network.loadNetworkResource
Domain: Network
Method name: loadNetworkResource
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'frameId' (type: Page.FrameId) -> Frame id to get the resource for.
'url' (type: string) -> URL of the resource to get content for.
'options' (type: LoadNetworkResourceOptions) -> Options for the request.
Returns:
'resource' (type: LoadNetworkResourcePageResult) -> No description
Description: Fetches the resource and returns the content.
- Network_replayXHR(self, requestId)
- Function path: Network.replayXHR
Domain: Network
Method name: replayXHR
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'requestId' (type: RequestId) -> Identifier of XHR to replay.
No return value.
Description: This method sends a new XMLHttpRequest which is identical to the original one. The following
parameters should be identical: method, url, async, request body, extra headers, withCredentials
attribute, user, password.
- Network_searchInResponseBody(self, requestId, query, **kwargs)
- Function path: Network.searchInResponseBody
Domain: Network
Method name: searchInResponseBody
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'requestId' (type: RequestId) -> Identifier of the network response to search.
'query' (type: string) -> String to search for.
Optional arguments:
'caseSensitive' (type: boolean) -> If true, search is case sensitive.
'isRegex' (type: boolean) -> If true, treats string parameter as regex.
Returns:
'result' (type: array) -> List of search matches.
Description: Searches for given string in response content.
- Network_setAcceptedEncodings(self, encodings)
- Function path: Network.setAcceptedEncodings
Domain: Network
Method name: setAcceptedEncodings
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'encodings' (type: array) -> List of accepted content encodings.
No return value.
Description: Sets a list of content encodings that will be accepted. Empty list means no encoding is accepted.
- Network_setAttachDebugStack(self, enabled)
- Function path: Network.setAttachDebugStack
Domain: Network
Method name: setAttachDebugStack
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'enabled' (type: boolean) -> Whether to attach a page script stack for debugging purpose.
No return value.
Description: Specifies whether to attach a page script stack id in requests
- Network_setBlockedURLs(self, urls)
- Function path: Network.setBlockedURLs
Domain: Network
Method name: setBlockedURLs
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'urls' (type: array) -> URL patterns to block. Wildcards ('*') are allowed.
No return value.
Description: Blocks URLs from loading.
- Network_setBypassServiceWorker(self, bypass)
- Function path: Network.setBypassServiceWorker
Domain: Network
Method name: setBypassServiceWorker
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'bypass' (type: boolean) -> Bypass service worker and load from network.
No return value.
Description: Toggles ignoring of service worker for each request.
- Network_setCacheDisabled(self, cacheDisabled)
- Function path: Network.setCacheDisabled
Domain: Network
Method name: setCacheDisabled
Parameters:
Required arguments:
'cacheDisabled' (type: boolean) -> Cache disabled state.
No return value.
Description: Toggles ignoring cache for each request. If `true`, cache will not be used.
- Network_setCookie(self, name, value, **kwargs)
- Function path: Network.setCookie
Domain: Network
Method name: setCookie
Parameters:
Required arguments:
'name' (type: string) -> Cookie name.
'value' (type: string) -> Cookie value.
Optional arguments:
'url' (type: string) -> The request-URI to associate with the setting of the cookie. This value can affect the
default domain, path, source port, and source scheme values of the created cookie.
'domain' (type: string) -> Cookie domain.
'path' (type: string) -> Cookie path.
'secure' (type: boolean) -> True if cookie is secure.
'httpOnly' (type: boolean) -> True if cookie is http-only.
'sameSite' (type: CookieSameSite) -> Cookie SameSite type.
'expires' (type: TimeSinceEpoch) -> Cookie expiration date, session cookie if not set
'priority' (type: CookiePriority) -> Cookie Priority type.
'sameParty' (type: boolean) -> True if cookie is SameParty.
'sourceScheme' (type: CookieSourceScheme) -> Cookie source scheme type.
'sourcePort' (type: integer) -> Cookie source port. Valid values are {-1, [1, 65535]}, -1 indicates an unspecified port.
An unspecified port value allows protocol clients to emulate legacy cookie scope for the port.
This is a temporary ability and it will be removed in the future.
Returns:
'success' (type: boolean) -> Always set to true. If an error occurs, the response indicates protocol error.
Description: Sets a cookie with the given cookie data; may overwrite equivalent cookies if they exist.
- Network_setCookies(self, cookies)
- Function path: Network.setCookies
Domain: Network
Method name: setCookies
Parameters:
Required arguments:
'cookies' (type: array) -> Cookies to be set.
No return value.
Description: Sets given cookies.
- Network_setExtraHTTPHeaders(self, headers)
- Function path: Network.setExtraHTTPHeaders
Domain: Network
Method name: setExtraHTTPHeaders
Parameters:
Required arguments:
'headers' (type: Headers) -> Map with extra HTTP headers.
No return value.
Description: Specifies whether to always send extra HTTP headers with the requests from this page.
- Network_setRequestInterception(self, patterns)
- Function path: Network.setRequestInterception
Domain: Network
Method name: setRequestInterception
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'patterns' (type: array) -> Requests matching any of these patterns will be forwarded and wait for the corresponding
continueInterceptedRequest call.
No return value.
Description: Sets the requests to intercept that match the provided patterns and optionally resource types.
Deprecated, please use Fetch.enable instead.
- Network_setUserAgentOverride(self, userAgent, **kwargs)
- Function path: Network.setUserAgentOverride
Domain: Network
Method name: setUserAgentOverride
Parameters:
Required arguments:
'userAgent' (type: string) -> User agent to use.
Optional arguments:
'acceptLanguage' (type: string) -> Browser langugage to emulate.
'platform' (type: string) -> The platform navigator.platform should return.
'userAgentMetadata' (type: Emulation.UserAgentMetadata) -> To be sent in Sec-CH-UA-* headers and returned in navigator.userAgentData
No return value.
Description: Allows overriding user agent with the given string.
- Network_takeResponseBodyForInterceptionAsStream(self, interceptionId)
- Function path: Network.takeResponseBodyForInterceptionAsStream
Domain: Network
Method name: takeResponseBodyForInterceptionAsStream
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'interceptionId' (type: InterceptionId) -> No description
Returns:
'stream' (type: IO.StreamHandle) -> No description
Description: Returns a handle to the stream representing the response body. Note that after this command,
the intercepted request can't be continued as is -- you either need to cancel it or to provide
the response body. The stream only supports sequential read, IO.read will fail if the position
is specified.
- Overlay_disable(self)
- Function path: Overlay.disable
Domain: Overlay
Method name: disable
No return value.
Description: Disables domain notifications.
- Overlay_enable(self)
- Function path: Overlay.enable
Domain: Overlay
Method name: enable
No return value.
Description: Enables domain notifications.
- Overlay_getGridHighlightObjectsForTest(self, nodeIds)
- Function path: Overlay.getGridHighlightObjectsForTest
Domain: Overlay
Method name: getGridHighlightObjectsForTest
Parameters:
Required arguments:
'nodeIds' (type: array) -> Ids of the node to get highlight object for.
Returns:
'highlights' (type: object) -> Grid Highlight data for the node ids provided.
Description: For Persistent Grid testing.
- Overlay_getHighlightObjectForTest(self, nodeId, **kwargs)
- Function path: Overlay.getHighlightObjectForTest
Domain: Overlay
Method name: getHighlightObjectForTest
Parameters:
Required arguments:
'nodeId' (type: DOM.NodeId) -> Id of the node to get highlight object for.
Optional arguments:
'includeDistance' (type: boolean) -> Whether to include distance info.
'includeStyle' (type: boolean) -> Whether to include style info.
'colorFormat' (type: ColorFormat) -> The color format to get config with (default: hex).
'showAccessibilityInfo' (type: boolean) -> Whether to show accessibility info (default: true).
Returns:
'highlight' (type: object) -> Highlight data for the node.
Description: For testing.
- Overlay_getSourceOrderHighlightObjectForTest(self, nodeId)
- Function path: Overlay.getSourceOrderHighlightObjectForTest
Domain: Overlay
Method name: getSourceOrderHighlightObjectForTest
Parameters:
Required arguments:
'nodeId' (type: DOM.NodeId) -> Id of the node to highlight.
Returns:
'highlight' (type: object) -> Source order highlight data for the node id provided.
Description: For Source Order Viewer testing.
- Overlay_hideHighlight(self)
- Function path: Overlay.hideHighlight
Domain: Overlay
Method name: hideHighlight
No return value.
Description: Hides any highlight.
- Overlay_highlightFrame(self, frameId, **kwargs)
- Function path: Overlay.highlightFrame
Domain: Overlay
Method name: highlightFrame
Parameters:
Required arguments:
'frameId' (type: Page.FrameId) -> Identifier of the frame to highlight.
Optional arguments:
'contentColor' (type: DOM.RGBA) -> The content box highlight fill color (default: transparent).
'contentOutlineColor' (type: DOM.RGBA) -> The content box highlight outline color (default: transparent).
No return value.
Description: Highlights owner element of the frame with given id.
Deprecated: Doesn't work reliablity and cannot be fixed due to process
separatation (the owner node might be in a different process). Determine
the owner node in the client and use highlightNode.
- Overlay_highlightNode(self, highlightConfig, **kwargs)
- Function path: Overlay.highlightNode
Domain: Overlay
Method name: highlightNode
Parameters:
Required arguments:
'highlightConfig' (type: HighlightConfig) -> A descriptor for the highlight appearance.
Optional arguments:
'nodeId' (type: DOM.NodeId) -> Identifier of the node to highlight.
'backendNodeId' (type: DOM.BackendNodeId) -> Identifier of the backend node to highlight.
'objectId' (type: Runtime.RemoteObjectId) -> JavaScript object id of the node to be highlighted.
'selector' (type: string) -> Selectors to highlight relevant nodes.
No return value.
Description: Highlights DOM node with given id or with the given JavaScript object wrapper. Either nodeId or
objectId must be specified.
- Overlay_highlightQuad(self, quad, **kwargs)
- Function path: Overlay.highlightQuad
Domain: Overlay
Method name: highlightQuad
Parameters:
Required arguments:
'quad' (type: DOM.Quad) -> Quad to highlight
Optional arguments:
'color' (type: DOM.RGBA) -> The highlight fill color (default: transparent).
'outlineColor' (type: DOM.RGBA) -> The highlight outline color (default: transparent).
No return value.
Description: Highlights given quad. Coordinates are absolute with respect to the main frame viewport.
- Overlay_highlightRect(self, x, y, width, height, **kwargs)
- Function path: Overlay.highlightRect
Domain: Overlay
Method name: highlightRect
Parameters:
Required arguments:
'x' (type: integer) -> X coordinate
'y' (type: integer) -> Y coordinate
'width' (type: integer) -> Rectangle width
'height' (type: integer) -> Rectangle height
Optional arguments:
'color' (type: DOM.RGBA) -> The highlight fill color (default: transparent).
'outlineColor' (type: DOM.RGBA) -> The highlight outline color (default: transparent).
No return value.
Description: Highlights given rectangle. Coordinates are absolute with respect to the main frame viewport.
- Overlay_highlightSourceOrder(self, sourceOrderConfig, **kwargs)
- Function path: Overlay.highlightSourceOrder
Domain: Overlay
Method name: highlightSourceOrder
Parameters:
Required arguments:
'sourceOrderConfig' (type: SourceOrderConfig) -> A descriptor for the appearance of the overlay drawing.
Optional arguments:
'nodeId' (type: DOM.NodeId) -> Identifier of the node to highlight.
'backendNodeId' (type: DOM.BackendNodeId) -> Identifier of the backend node to highlight.
'objectId' (type: Runtime.RemoteObjectId) -> JavaScript object id of the node to be highlighted.
No return value.
Description: Highlights the source order of the children of the DOM node with given id or with the given
JavaScript object wrapper. Either nodeId or objectId must be specified.
- Overlay_setInspectMode(self, mode, **kwargs)
- Function path: Overlay.setInspectMode
Domain: Overlay
Method name: setInspectMode
Parameters:
Required arguments:
'mode' (type: InspectMode) -> Set an inspection mode.
Optional arguments:
'highlightConfig' (type: HighlightConfig) -> A descriptor for the highlight appearance of hovered-over nodes. May be omitted if `enabled
== false`.
No return value.
Description: Enters the 'inspect' mode. In this mode, elements that user is hovering over are highlighted.
Backend then generates 'inspectNodeRequested' event upon element selection.
- Overlay_setPausedInDebuggerMessage(self, **kwargs)
- Function path: Overlay.setPausedInDebuggerMessage
Domain: Overlay
Method name: setPausedInDebuggerMessage
Parameters:
Optional arguments:
'message' (type: string) -> The message to display, also triggers resume and step over controls.
No return value.
- Overlay_setShowAdHighlights(self, show)
- Function path: Overlay.setShowAdHighlights
Domain: Overlay
Method name: setShowAdHighlights
Parameters:
Required arguments:
'show' (type: boolean) -> True for showing ad highlights
No return value.
Description: Highlights owner element of all frames detected to be ads.
- Overlay_setShowContainerQueryOverlays(self, containerQueryHighlightConfigs)
- Function path: Overlay.setShowContainerQueryOverlays
Domain: Overlay
Method name: setShowContainerQueryOverlays
Parameters:
Required arguments:
'containerQueryHighlightConfigs' (type: array) -> An array of node identifiers and descriptors for the highlight appearance.
No return value.
- Overlay_setShowDebugBorders(self, show)
- Function path: Overlay.setShowDebugBorders
Domain: Overlay
Method name: setShowDebugBorders
Parameters:
Required arguments:
'show' (type: boolean) -> True for showing debug borders
No return value.
Description: Requests that backend shows debug borders on layers
- Overlay_setShowFPSCounter(self, show)
- Function path: Overlay.setShowFPSCounter
Domain: Overlay
Method name: setShowFPSCounter
Parameters:
Required arguments:
'show' (type: boolean) -> True for showing the FPS counter
No return value.
Description: Requests that backend shows the FPS counter
- Overlay_setShowFlexOverlays(self, flexNodeHighlightConfigs)
- Function path: Overlay.setShowFlexOverlays
Domain: Overlay
Method name: setShowFlexOverlays
Parameters:
Required arguments:
'flexNodeHighlightConfigs' (type: array) -> An array of node identifiers and descriptors for the highlight appearance.
No return value.
- Overlay_setShowGridOverlays(self, gridNodeHighlightConfigs)
- Function path: Overlay.setShowGridOverlays
Domain: Overlay
Method name: setShowGridOverlays
Parameters:
Required arguments:
'gridNodeHighlightConfigs' (type: array) -> An array of node identifiers and descriptors for the highlight appearance.
No return value.
Description: Highlight multiple elements with the CSS Grid overlay.
- Overlay_setShowHinge(self, **kwargs)
- Function path: Overlay.setShowHinge
Domain: Overlay
Method name: setShowHinge
Parameters:
Optional arguments:
'hingeConfig' (type: HingeConfig) -> hinge data, null means hideHinge
No return value.
Description: Add a dual screen device hinge
- Overlay_setShowHitTestBorders(self, show)
- Function path: Overlay.setShowHitTestBorders
Domain: Overlay
Method name: setShowHitTestBorders
Parameters:
Required arguments:
'show' (type: boolean) -> True for showing hit-test borders
No return value.
Description: Requests that backend shows hit-test borders on layers
- Overlay_setShowLayoutShiftRegions(self, result)
- Function path: Overlay.setShowLayoutShiftRegions
Domain: Overlay
Method name: setShowLayoutShiftRegions
Parameters:
Required arguments:
'result' (type: boolean) -> True for showing layout shift regions
No return value.
Description: Requests that backend shows layout shift regions
- Overlay_setShowPaintRects(self, result)
- Function path: Overlay.setShowPaintRects
Domain: Overlay
Method name: setShowPaintRects
Parameters:
Required arguments:
'result' (type: boolean) -> True for showing paint rectangles
No return value.
Description: Requests that backend shows paint rectangles
- Overlay_setShowScrollBottleneckRects(self, show)
- Function path: Overlay.setShowScrollBottleneckRects
Domain: Overlay
Method name: setShowScrollBottleneckRects
Parameters:
Required arguments:
'show' (type: boolean) -> True for showing scroll bottleneck rects
No return value.
Description: Requests that backend shows scroll bottleneck rects
- Overlay_setShowScrollSnapOverlays(self, scrollSnapHighlightConfigs)
- Function path: Overlay.setShowScrollSnapOverlays
Domain: Overlay
Method name: setShowScrollSnapOverlays
Parameters:
Required arguments:
'scrollSnapHighlightConfigs' (type: array) -> An array of node identifiers and descriptors for the highlight appearance.
No return value.
- Overlay_setShowViewportSizeOnResize(self, show)
- Function path: Overlay.setShowViewportSizeOnResize
Domain: Overlay
Method name: setShowViewportSizeOnResize
Parameters:
Required arguments:
'show' (type: boolean) -> Whether to paint size or not.
No return value.
Description: Paints viewport size upon main frame resize.
- Overlay_setShowWebVitals(self, show)
- Function path: Overlay.setShowWebVitals
Domain: Overlay
Method name: setShowWebVitals
Parameters:
Required arguments:
'show' (type: boolean) -> No description
No return value.
Description: Request that backend shows an overlay with web vital metrics.
- Page_addCompilationCache(self, url, data)
- Function path: Page.addCompilationCache
Domain: Page
Method name: addCompilationCache
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'url' (type: string) -> No description
'data' (type: string) -> Base64-encoded data (Encoded as a base64 string when passed over JSON)
No return value.
Description: Seeds compilation cache for given url. Compilation cache does not survive
cross-process navigation.
- Page_addScriptToEvaluateOnLoad(self, scriptSource)
- Function path: Page.addScriptToEvaluateOnLoad
Domain: Page
Method name: addScriptToEvaluateOnLoad
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'scriptSource' (type: string) -> No description
Returns:
'identifier' (type: ScriptIdentifier) -> Identifier of the added script.
Description: Deprecated, please use addScriptToEvaluateOnNewDocument instead.
- Page_addScriptToEvaluateOnNewDocument(self, source, **kwargs)
- Function path: Page.addScriptToEvaluateOnNewDocument
Domain: Page
Method name: addScriptToEvaluateOnNewDocument
Parameters:
Required arguments:
'source' (type: string) -> No description
Optional arguments:
'worldName' (type: string) -> If specified, creates an isolated world with the given name and evaluates given script in it.
This world name will be used as the ExecutionContextDescription::name when the corresponding
event is emitted.
'includeCommandLineAPI' (type: boolean) -> Specifies whether command line API should be available to the script, defaults
to false.
Returns:
'identifier' (type: ScriptIdentifier) -> Identifier of the added script.
Description: Evaluates given script in every frame upon creation (before loading frame's scripts).
- Page_bringToFront(self)
- Function path: Page.bringToFront
Domain: Page
Method name: bringToFront
No return value.
Description: Brings page to front (activates tab).
- Page_captureScreenshot(self, **kwargs)
- Function path: Page.captureScreenshot
Domain: Page
Method name: captureScreenshot
Parameters:
Optional arguments:
'format' (type: string) -> Image compression format (defaults to png).
'quality' (type: integer) -> Compression quality from range [0..100] (jpeg only).
'clip' (type: Viewport) -> Capture the screenshot of a given region only.
'fromSurface' (type: boolean) -> Capture the screenshot from the surface, rather than the view. Defaults to true.
'captureBeyondViewport' (type: boolean) -> Capture the screenshot beyond the viewport. Defaults to false.
Returns:
'data' (type: string) -> Base64-encoded image data. (Encoded as a base64 string when passed over JSON)
Description: Capture page screenshot.
- Page_captureSnapshot(self, **kwargs)
- Function path: Page.captureSnapshot
Domain: Page
Method name: captureSnapshot
WARNING: This function is marked 'Experimental'!
Parameters:
Optional arguments:
'format' (type: string) -> Format (defaults to mhtml).
Returns:
'data' (type: string) -> Serialized page data.
Description: Returns a snapshot of the page as a string. For MHTML format, the serialization includes
iframes, shadow DOM, external resources, and element-inline styles.
- Page_clearCompilationCache(self)
- Function path: Page.clearCompilationCache
Domain: Page
Method name: clearCompilationCache
WARNING: This function is marked 'Experimental'!
No return value.
Description: Clears seeded compilation cache.
- Page_clearDeviceMetricsOverride(self)
- Function path: Page.clearDeviceMetricsOverride
Domain: Page
Method name: clearDeviceMetricsOverride
WARNING: This function is marked 'Experimental'!
No return value.
Description: Clears the overridden device metrics.
- Page_clearDeviceOrientationOverride(self)
- Function path: Page.clearDeviceOrientationOverride
Domain: Page
Method name: clearDeviceOrientationOverride
WARNING: This function is marked 'Experimental'!
No return value.
Description: Clears the overridden Device Orientation.
- Page_clearGeolocationOverride(self)
- Function path: Page.clearGeolocationOverride
Domain: Page
Method name: clearGeolocationOverride
No return value.
Description: Clears the overridden Geolocation Position and Error.
- Page_close(self)
- Function path: Page.close
Domain: Page
Method name: close
WARNING: This function is marked 'Experimental'!
No return value.
Description: Tries to close page, running its beforeunload hooks, if any.
- Page_crash(self)
- Function path: Page.crash
Domain: Page
Method name: crash
WARNING: This function is marked 'Experimental'!
No return value.
Description: Crashes renderer on the IO thread, generates minidumps.
- Page_createIsolatedWorld(self, frameId, **kwargs)
- Function path: Page.createIsolatedWorld
Domain: Page
Method name: createIsolatedWorld
Parameters:
Required arguments:
'frameId' (type: FrameId) -> Id of the frame in which the isolated world should be created.
Optional arguments:
'worldName' (type: string) -> An optional name which is reported in the Execution Context.
'grantUniveralAccess' (type: boolean) -> Whether or not universal access should be granted to the isolated world. This is a powerful
option, use with caution.
Returns:
'executionContextId' (type: Runtime.ExecutionContextId) -> Execution context of the isolated world.
Description: Creates an isolated world for the given frame.
- Page_deleteCookie(self, cookieName, url)
- Function path: Page.deleteCookie
Domain: Page
Method name: deleteCookie
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'cookieName' (type: string) -> Name of the cookie to remove.
'url' (type: string) -> URL to match cooke domain and path.
No return value.
Description: Deletes browser cookie with given name, domain and path.
- Page_disable(self)
- Function path: Page.disable
Domain: Page
Method name: disable
No return value.
Description: Disables page domain notifications.
- Page_enable(self)
- Function path: Page.enable
Domain: Page
Method name: enable
No return value.
Description: Enables page domain notifications.
- Page_generateTestReport(self, message, **kwargs)
- Function path: Page.generateTestReport
Domain: Page
Method name: generateTestReport
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'message' (type: string) -> Message to be displayed in the report.
Optional arguments:
'group' (type: string) -> Specifies the endpoint group to deliver the report to.
No return value.
Description: Generates a report for testing.
- Page_getAppManifest(self)
- Function path: Page.getAppManifest
Domain: Page
Method name: getAppManifest
Returns:
'url' (type: string) -> Manifest location.
'errors' (type: array) -> No description
'data' (type: string) -> Manifest content.
'parsed' (type: AppManifestParsedProperties) -> Parsed manifest properties
- Page_getCookies(self)
- Function path: Page.getCookies
Domain: Page
Method name: getCookies
WARNING: This function is marked 'Experimental'!
Returns:
'cookies' (type: array) -> Array of cookie objects.
Description: Returns all browser cookies. Depending on the backend support, will return detailed cookie
information in the `cookies` field.
- Page_getFrameTree(self)
- Function path: Page.getFrameTree
Domain: Page
Method name: getFrameTree
Returns:
'frameTree' (type: FrameTree) -> Present frame tree structure.
Description: Returns present frame tree structure.
- Page_getInstallabilityErrors(self)
- Function path: Page.getInstallabilityErrors
Domain: Page
Method name: getInstallabilityErrors
WARNING: This function is marked 'Experimental'!
Returns:
'installabilityErrors' (type: array) -> No description
- Page_getLayoutMetrics(self)
- Function path: Page.getLayoutMetrics
Domain: Page
Method name: getLayoutMetrics
Returns:
'layoutViewport' (type: LayoutViewport) -> Deprecated metrics relating to the layout viewport. Can be in DP or in CSS pixels depending on the `enable-use-zoom-for-dsf` flag. Use `cssLayoutViewport` instead.
'visualViewport' (type: VisualViewport) -> Deprecated metrics relating to the visual viewport. Can be in DP or in CSS pixels depending on the `enable-use-zoom-for-dsf` flag. Use `cssVisualViewport` instead.
'contentSize' (type: DOM.Rect) -> Deprecated size of scrollable area. Can be in DP or in CSS pixels depending on the `enable-use-zoom-for-dsf` flag. Use `cssContentSize` instead.
'cssLayoutViewport' (type: LayoutViewport) -> Metrics relating to the layout viewport in CSS pixels.
'cssVisualViewport' (type: VisualViewport) -> Metrics relating to the visual viewport in CSS pixels.
'cssContentSize' (type: DOM.Rect) -> Size of scrollable area in CSS pixels.
Description: Returns metrics relating to the layouting of the page, such as viewport bounds/scale.
- Page_getManifestIcons(self)
- Function path: Page.getManifestIcons
Domain: Page
Method name: getManifestIcons
WARNING: This function is marked 'Experimental'!
Returns:
'primaryIcon' (type: string) -> No description
- Page_getNavigationHistory(self)
- Function path: Page.getNavigationHistory
Domain: Page
Method name: getNavigationHistory
Returns:
'currentIndex' (type: integer) -> Index of the current navigation history entry.
'entries' (type: array) -> Array of navigation history entries.
Description: Returns navigation history for the current page.
- Page_getPermissionsPolicyState(self, frameId)
- Function path: Page.getPermissionsPolicyState
Domain: Page
Method name: getPermissionsPolicyState
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'frameId' (type: FrameId) -> No description
Returns:
'states' (type: array) -> No description
Description: Get Permissions Policy state on given frame.
- Page_getResourceContent(self, frameId, url)
- Function path: Page.getResourceContent
Domain: Page
Method name: getResourceContent
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'frameId' (type: FrameId) -> Frame id to get resource for.
'url' (type: string) -> URL of the resource to get content for.
Returns:
'content' (type: string) -> Resource content.
'base64Encoded' (type: boolean) -> True, if content was served as base64.
Description: Returns content of the given resource.
- Page_getResourceTree(self)
- Function path: Page.getResourceTree
Domain: Page
Method name: getResourceTree
WARNING: This function is marked 'Experimental'!
Returns:
'frameTree' (type: FrameResourceTree) -> Present frame / resource tree structure.
Description: Returns present frame / resource tree structure.
- Page_handleJavaScriptDialog(self, accept, **kwargs)
- Function path: Page.handleJavaScriptDialog
Domain: Page
Method name: handleJavaScriptDialog
Parameters:
Required arguments:
'accept' (type: boolean) -> Whether to accept or dismiss the dialog.
Optional arguments:
'promptText' (type: string) -> The text to enter into the dialog prompt before accepting. Used only if this is a prompt
dialog.
No return value.
Description: Accepts or dismisses a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload).
- Page_navigate(self, url, **kwargs)
- Function path: Page.navigate
Domain: Page
Method name: navigate
Parameters:
Required arguments:
'url' (type: string) -> URL to navigate the page to.
Optional arguments:
'referrer' (type: string) -> Referrer URL.
'transitionType' (type: TransitionType) -> Intended transition type.
'frameId' (type: FrameId) -> Frame id to navigate, if not specified navigates the top frame.
'referrerPolicy' (type: ReferrerPolicy) -> Referrer-policy used for the navigation.
Returns:
'frameId' (type: FrameId) -> Frame id that has navigated (or failed to navigate)
'loaderId' (type: Network.LoaderId) -> Loader identifier.
'errorText' (type: string) -> User friendly error message, present if and only if navigation has failed.
Description: Navigates current page to the given URL.
- Page_navigateToHistoryEntry(self, entryId)
- Function path: Page.navigateToHistoryEntry
Domain: Page
Method name: navigateToHistoryEntry
Parameters:
Required arguments:
'entryId' (type: integer) -> Unique id of the entry to navigate to.
No return value.
Description: Navigates current page to the given history entry.
- Page_printToPDF(self, **kwargs)
- Function path: Page.printToPDF
Domain: Page
Method name: printToPDF
Parameters:
Optional arguments:
'landscape' (type: boolean) -> Paper orientation. Defaults to false.
'displayHeaderFooter' (type: boolean) -> Display header and footer. Defaults to false.
'printBackground' (type: boolean) -> Print background graphics. Defaults to false.
'scale' (type: number) -> Scale of the webpage rendering. Defaults to 1.
'paperWidth' (type: number) -> Paper width in inches. Defaults to 8.5 inches.
'paperHeight' (type: number) -> Paper height in inches. Defaults to 11 inches.
'marginTop' (type: number) -> Top margin in inches. Defaults to 1cm (~0.4 inches).
'marginBottom' (type: number) -> Bottom margin in inches. Defaults to 1cm (~0.4 inches).
'marginLeft' (type: number) -> Left margin in inches. Defaults to 1cm (~0.4 inches).
'marginRight' (type: number) -> Right margin in inches. Defaults to 1cm (~0.4 inches).
'pageRanges' (type: string) -> Paper ranges to print, e.g., '1-5, 8, 11-13'. Defaults to the empty string, which means
print all pages.
'ignoreInvalidPageRanges' (type: boolean) -> Whether to silently ignore invalid but successfully parsed page ranges, such as '3-2'.
Defaults to false.
'headerTemplate' (type: string) -> HTML template for the print header. Should be valid HTML markup with following
classes used to inject printing values into them:
- `date`: formatted print date
- `title`: document title
- `url`: document location
- `pageNumber`: current page number
- `totalPages`: total pages in the document
For example, `<span class=title></span>` would generate span containing the title.
'footerTemplate' (type: string) -> HTML template for the print footer. Should use the same format as the `headerTemplate`.
'preferCSSPageSize' (type: boolean) -> Whether or not to prefer page size as defined by css. Defaults to false,
in which case the content will be scaled to fit the paper size.
'transferMode' (type: string) -> return as stream
Returns:
'data' (type: string) -> Base64-encoded pdf data. Empty if |returnAsStream| is specified. (Encoded as a base64 string when passed over JSON)
'stream' (type: IO.StreamHandle) -> A handle of the stream that holds resulting PDF data.
Description: Print page as PDF.
- Page_produceCompilationCache(self, scripts)
- Function path: Page.produceCompilationCache
Domain: Page
Method name: produceCompilationCache
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'scripts' (type: array) -> No description
No return value.
Description: Requests backend to produce compilation cache for the specified scripts.
Unlike setProduceCompilationCache, this allows client to only produce cache
for specific scripts. `scripts` are appeneded to the list of scripts
for which the cache for would produced. Disabling compilation cache with
`setProduceCompilationCache` would reset all pending cache requests.
The list may also be reset during page navigation.
When script with a matching URL is encountered, the cache is optionally
produced upon backend discretion, based on internal heuristics.
See also: `Page.compilationCacheProduced`.
- Page_reload(self, **kwargs)
- Function path: Page.reload
Domain: Page
Method name: reload
Parameters:
Optional arguments:
'ignoreCache' (type: boolean) -> If true, browser cache is ignored (as if the user pressed Shift+refresh).
'scriptToEvaluateOnLoad' (type: string) -> If set, the script will be injected into all frames of the inspected page after reload.
Argument will be ignored if reloading dataURL origin.
No return value.
Description: Reloads given page optionally ignoring the cache.
- Page_removeScriptToEvaluateOnLoad(self, identifier)
- Function path: Page.removeScriptToEvaluateOnLoad
Domain: Page
Method name: removeScriptToEvaluateOnLoad
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'identifier' (type: ScriptIdentifier) -> No description
No return value.
Description: Deprecated, please use removeScriptToEvaluateOnNewDocument instead.
- Page_removeScriptToEvaluateOnNewDocument(self, identifier)
- Function path: Page.removeScriptToEvaluateOnNewDocument
Domain: Page
Method name: removeScriptToEvaluateOnNewDocument
Parameters:
Required arguments:
'identifier' (type: ScriptIdentifier) -> No description
No return value.
Description: Removes given script from the list.
- Page_resetNavigationHistory(self)
- Function path: Page.resetNavigationHistory
Domain: Page
Method name: resetNavigationHistory
No return value.
Description: Resets navigation history for the current page.
- Page_screencastFrameAck(self, sessionId)
- Function path: Page.screencastFrameAck
Domain: Page
Method name: screencastFrameAck
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'sessionId' (type: integer) -> Frame number.
No return value.
Description: Acknowledges that a screencast frame has been received by the frontend.
- Page_searchInResource(self, frameId, url, query, **kwargs)
- Function path: Page.searchInResource
Domain: Page
Method name: searchInResource
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'frameId' (type: FrameId) -> Frame id for resource to search in.
'url' (type: string) -> URL of the resource to search in.
'query' (type: string) -> String to search for.
Optional arguments:
'caseSensitive' (type: boolean) -> If true, search is case sensitive.
'isRegex' (type: boolean) -> If true, treats string parameter as regex.
Returns:
'result' (type: array) -> List of search matches.
Description: Searches for given string in resource content.
- Page_setAdBlockingEnabled(self, enabled)
- Function path: Page.setAdBlockingEnabled
Domain: Page
Method name: setAdBlockingEnabled
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'enabled' (type: boolean) -> Whether to block ads.
No return value.
Description: Enable Chrome's experimental ad filter on all sites.
- Page_setBypassCSP(self, enabled)
- Function path: Page.setBypassCSP
Domain: Page
Method name: setBypassCSP
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'enabled' (type: boolean) -> Whether to bypass page CSP.
No return value.
Description: Enable page Content Security Policy by-passing.
- Page_setDeviceMetricsOverride(self, width, height, deviceScaleFactor, mobile, **kwargs)
- Function path: Page.setDeviceMetricsOverride
Domain: Page
Method name: setDeviceMetricsOverride
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'width' (type: integer) -> Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override.
'height' (type: integer) -> Overriding height value in pixels (minimum 0, maximum 10000000). 0 disables the override.
'deviceScaleFactor' (type: number) -> Overriding device scale factor value. 0 disables the override.
'mobile' (type: boolean) -> Whether to emulate mobile device. This includes viewport meta tag, overlay scrollbars, text
autosizing and more.
Optional arguments:
'scale' (type: number) -> Scale to apply to resulting view image.
'screenWidth' (type: integer) -> Overriding screen width value in pixels (minimum 0, maximum 10000000).
'screenHeight' (type: integer) -> Overriding screen height value in pixels (minimum 0, maximum 10000000).
'positionX' (type: integer) -> Overriding view X position on screen in pixels (minimum 0, maximum 10000000).
'positionY' (type: integer) -> Overriding view Y position on screen in pixels (minimum 0, maximum 10000000).
'dontSetVisibleSize' (type: boolean) -> Do not set visible view size, rely upon explicit setVisibleSize call.
'screenOrientation' (type: Emulation.ScreenOrientation) -> Screen orientation override.
'viewport' (type: Viewport) -> The viewport dimensions and scale. If not set, the override is cleared.
No return value.
Description: 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).
- Page_setDeviceOrientationOverride(self, alpha, beta, gamma)
- Function path: Page.setDeviceOrientationOverride
Domain: Page
Method name: setDeviceOrientationOverride
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'alpha' (type: number) -> Mock alpha
'beta' (type: number) -> Mock beta
'gamma' (type: number) -> Mock gamma
No return value.
Description: Overrides the Device Orientation.
- Page_setDocumentContent(self, frameId, html)
- Function path: Page.setDocumentContent
Domain: Page
Method name: setDocumentContent
Parameters:
Required arguments:
'frameId' (type: FrameId) -> Frame id to set HTML for.
'html' (type: string) -> HTML content to set.
No return value.
Description: Sets given markup as the document's HTML.
- Page_setDownloadBehavior(self, behavior, **kwargs)
- Function path: Page.setDownloadBehavior
Domain: Page
Method name: setDownloadBehavior
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'behavior' (type: string) -> Whether to allow all or deny all download requests, or use default Chrome behavior if
available (otherwise deny).
Optional arguments:
'downloadPath' (type: string) -> The default path to save downloaded files to. This is required if behavior is set to 'allow'
No return value.
Description: Set the behavior when downloading a file.
- Page_setFontFamilies(self, fontFamilies)
- Function path: Page.setFontFamilies
Domain: Page
Method name: setFontFamilies
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'fontFamilies' (type: FontFamilies) -> Specifies font families to set. If a font family is not specified, it won't be changed.
No return value.
Description: Set generic font families.
- Page_setFontSizes(self, fontSizes)
- Function path: Page.setFontSizes
Domain: Page
Method name: setFontSizes
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'fontSizes' (type: FontSizes) -> Specifies font sizes to set. If a font size is not specified, it won't be changed.
No return value.
Description: Set default font sizes.
- Page_setGeolocationOverride(self, **kwargs)
- Function path: Page.setGeolocationOverride
Domain: Page
Method name: setGeolocationOverride
Parameters:
Optional arguments:
'latitude' (type: number) -> Mock latitude
'longitude' (type: number) -> Mock longitude
'accuracy' (type: number) -> Mock accuracy
No return value.
Description: Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position
unavailable.
- Page_setInterceptFileChooserDialog(self, enabled)
- Function path: Page.setInterceptFileChooserDialog
Domain: Page
Method name: setInterceptFileChooserDialog
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'enabled' (type: boolean) -> No description
No return value.
Description: Intercept file chooser requests and transfer control to protocol clients.
When file chooser interception is enabled, native file chooser dialog is not shown.
Instead, a protocol event `Page.fileChooserOpened` is emitted.
- Page_setLifecycleEventsEnabled(self, enabled)
- Function path: Page.setLifecycleEventsEnabled
Domain: Page
Method name: setLifecycleEventsEnabled
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'enabled' (type: boolean) -> If true, starts emitting lifecycle events.
No return value.
Description: Controls whether page will emit lifecycle events.
- Page_setProduceCompilationCache(self, enabled)
- Function path: Page.setProduceCompilationCache
Domain: Page
Method name: setProduceCompilationCache
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'enabled' (type: boolean) -> No description
No return value.
Description: Forces compilation cache to be generated for every subresource script.
See also: `Page.produceCompilationCache`.
- Page_setTouchEmulationEnabled(self, enabled, **kwargs)
- Function path: Page.setTouchEmulationEnabled
Domain: Page
Method name: setTouchEmulationEnabled
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'enabled' (type: boolean) -> Whether the touch event emulation should be enabled.
Optional arguments:
'configuration' (type: string) -> Touch/gesture events configuration. Default: current platform.
No return value.
Description: Toggles mouse event-based touch event emulation.
- Page_setWebLifecycleState(self, state)
- Function path: Page.setWebLifecycleState
Domain: Page
Method name: setWebLifecycleState
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'state' (type: string) -> Target lifecycle state
No return value.
Description: Tries to update the web lifecycle state of the page.
It will transition the page to the given state according to:
https://github.com/WICG/web-lifecycle/
- Page_startScreencast(self, **kwargs)
- Function path: Page.startScreencast
Domain: Page
Method name: startScreencast
WARNING: This function is marked 'Experimental'!
Parameters:
Optional arguments:
'format' (type: string) -> Image compression format.
'quality' (type: integer) -> Compression quality from range [0..100].
'maxWidth' (type: integer) -> Maximum screenshot width.
'maxHeight' (type: integer) -> Maximum screenshot height.
'everyNthFrame' (type: integer) -> Send every n-th frame.
No return value.
Description: Starts sending each frame using the `screencastFrame` event.
- Page_stopLoading(self)
- Function path: Page.stopLoading
Domain: Page
Method name: stopLoading
No return value.
Description: Force the page stop all navigations and pending resource fetches.
- Page_stopScreencast(self)
- Function path: Page.stopScreencast
Domain: Page
Method name: stopScreencast
WARNING: This function is marked 'Experimental'!
No return value.
Description: Stops sending each frame in the `screencastFrame`.
- Page_waitForDebugger(self)
- Function path: Page.waitForDebugger
Domain: Page
Method name: waitForDebugger
WARNING: This function is marked 'Experimental'!
No return value.
Description: Pauses page execution. Can be resumed using generic Runtime.runIfWaitingForDebugger.
- PerformanceTimeline_enable(self, eventTypes)
- Function path: PerformanceTimeline.enable
Domain: PerformanceTimeline
Method name: enable
Parameters:
Required arguments:
'eventTypes' (type: array) -> The types of event to report, as specified in
https://w3c.github.io/performance-timeline/#dom-performanceentry-entrytype
The specified filter overrides any previous filters, passing empty
filter disables recording.
Note that not all types exposed to the web platform are currently supported.
No return value.
Description: Previously buffered events would be reported before method returns.
See also: timelineEventAdded
- Performance_disable(self)
- Function path: Performance.disable
Domain: Performance
Method name: disable
No return value.
Description: Disable collecting and reporting metrics.
- Performance_enable(self, **kwargs)
- Function path: Performance.enable
Domain: Performance
Method name: enable
Parameters:
Optional arguments:
'timeDomain' (type: string) -> Time domain to use for collecting and reporting duration metrics.
No return value.
Description: Enable collecting and reporting metrics.
- Performance_getMetrics(self)
- Function path: Performance.getMetrics
Domain: Performance
Method name: getMetrics
Returns:
'metrics' (type: array) -> Current values for run-time metrics.
Description: Retrieve current values of run-time metrics.
- Performance_setTimeDomain(self, timeDomain)
- Function path: Performance.setTimeDomain
Domain: Performance
Method name: setTimeDomain
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'timeDomain' (type: string) -> Time domain
No return value.
Description: Sets time domain to use for collecting and reporting duration metrics.
Note that this must be called before enabling metrics collection. Calling
this method while metrics collection is enabled returns an error.
- Profiler_disable(self)
- Function path: Profiler.disable
Domain: Profiler
Method name: disable
No return value.
- Profiler_disableCounters(self)
- Function path: Profiler.disableCounters
Domain: Profiler
Method name: disableCounters
WARNING: This function is marked 'Experimental'!
No return value.
Description: Disable counters collection.
- Profiler_disableRuntimeCallStats(self)
- Function path: Profiler.disableRuntimeCallStats
Domain: Profiler
Method name: disableRuntimeCallStats
WARNING: This function is marked 'Experimental'!
No return value.
Description: Disable run time call stats collection.
- Profiler_enable(self)
- Function path: Profiler.enable
Domain: Profiler
Method name: enable
No return value.
- Profiler_enableCounters(self)
- Function path: Profiler.enableCounters
Domain: Profiler
Method name: enableCounters
WARNING: This function is marked 'Experimental'!
No return value.
Description: Enable counters collection.
- Profiler_enableRuntimeCallStats(self)
- Function path: Profiler.enableRuntimeCallStats
Domain: Profiler
Method name: enableRuntimeCallStats
WARNING: This function is marked 'Experimental'!
No return value.
Description: Enable run time call stats collection.
- Profiler_getBestEffortCoverage(self)
- Function path: Profiler.getBestEffortCoverage
Domain: Profiler
Method name: getBestEffortCoverage
Returns:
'result' (type: array) -> Coverage data for the current isolate.
Description: Collect coverage data for the current isolate. The coverage data may be incomplete due to
garbage collection.
- Profiler_getCounters(self)
- Function path: Profiler.getCounters
Domain: Profiler
Method name: getCounters
WARNING: This function is marked 'Experimental'!
Returns:
'result' (type: array) -> Collected counters information.
Description: Retrieve counters.
- Profiler_getRuntimeCallStats(self)
- Function path: Profiler.getRuntimeCallStats
Domain: Profiler
Method name: getRuntimeCallStats
WARNING: This function is marked 'Experimental'!
Returns:
'result' (type: array) -> Collected runtime call counter information.
Description: Retrieve run time call stats.
- Profiler_setSamplingInterval(self, interval)
- Function path: Profiler.setSamplingInterval
Domain: Profiler
Method name: setSamplingInterval
Parameters:
Required arguments:
'interval' (type: integer) -> New sampling interval in microseconds.
No return value.
Description: Changes CPU profiler sampling interval. Must be called before CPU profiles recording started.
- Profiler_start(self)
- Function path: Profiler.start
Domain: Profiler
Method name: start
No return value.
- Profiler_startPreciseCoverage(self, **kwargs)
- Function path: Profiler.startPreciseCoverage
Domain: Profiler
Method name: startPreciseCoverage
Parameters:
Optional arguments:
'callCount' (type: boolean) -> Collect accurate call counts beyond simple 'covered' or 'not covered'.
'detailed' (type: boolean) -> Collect block-based coverage.
'allowTriggeredUpdates' (type: boolean) -> Allow the backend to send updates on its own initiative
Returns:
'timestamp' (type: number) -> Monotonically increasing time (in seconds) when the coverage update was taken in the backend.
Description: Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code
coverage may be incomplete. Enabling prevents running optimized code and resets execution
counters.
- Profiler_startTypeProfile(self)
- Function path: Profiler.startTypeProfile
Domain: Profiler
Method name: startTypeProfile
WARNING: This function is marked 'Experimental'!
No return value.
Description: Enable type profile.
- Profiler_stop(self)
- Function path: Profiler.stop
Domain: Profiler
Method name: stop
Returns:
'profile' (type: Profile) -> Recorded profile.
- Profiler_stopPreciseCoverage(self)
- Function path: Profiler.stopPreciseCoverage
Domain: Profiler
Method name: stopPreciseCoverage
No return value.
Description: Disable precise code coverage. Disabling releases unnecessary execution count records and allows
executing optimized code.
- Profiler_stopTypeProfile(self)
- Function path: Profiler.stopTypeProfile
Domain: Profiler
Method name: stopTypeProfile
WARNING: This function is marked 'Experimental'!
No return value.
Description: Disable type profile. Disabling releases type profile data collected so far.
- Profiler_takePreciseCoverage(self)
- Function path: Profiler.takePreciseCoverage
Domain: Profiler
Method name: takePreciseCoverage
Returns:
'result' (type: array) -> Coverage data for the current isolate.
'timestamp' (type: number) -> Monotonically increasing time (in seconds) when the coverage update was taken in the backend.
Description: Collect coverage data for the current isolate, and resets execution counters. Precise code
coverage needs to have started.
- Profiler_takeTypeProfile(self)
- Function path: Profiler.takeTypeProfile
Domain: Profiler
Method name: takeTypeProfile
WARNING: This function is marked 'Experimental'!
Returns:
'result' (type: array) -> Type profile for all scripts since startTypeProfile() was turned on.
Description: Collect type profile.
- Runtime_addBinding(self, name, **kwargs)
- Function path: Runtime.addBinding
Domain: Runtime
Method name: addBinding
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'name' (type: string) -> No description
Optional arguments:
'executionContextId' (type: ExecutionContextId) -> If specified, the binding would only be exposed to the specified
execution context. If omitted and `executionContextName` is not set,
the binding is exposed to all execution contexts of the target.
This parameter is mutually exclusive with `executionContextName`.
'executionContextName' (type: string) -> If specified, the binding is exposed to the executionContext with
matching name, even for contexts created after the binding is added.
See also `ExecutionContext.name` and `worldName` parameter to
`Page.addScriptToEvaluateOnNewDocument`.
This parameter is mutually exclusive with `executionContextId`.
No return value.
Description: If executionContextId is empty, adds binding with the given name on the
global objects of all inspected contexts, including those created later,
bindings survive reloads.
Binding function takes exactly one argument, this argument should be string,
in case of any other input, function throws an exception.
Each binding function call produces Runtime.bindingCalled notification.
- Runtime_awaitPromise(self, promiseObjectId, **kwargs)
- Function path: Runtime.awaitPromise
Domain: Runtime
Method name: awaitPromise
Parameters:
Required arguments:
'promiseObjectId' (type: RemoteObjectId) -> Identifier of the promise.
Optional arguments:
'returnByValue' (type: boolean) -> Whether the result is expected to be a JSON object that should be sent by value.
'generatePreview' (type: boolean) -> Whether preview should be generated for the result.
Returns:
'result' (type: RemoteObject) -> Promise result. Will contain rejected value if promise was rejected.
'exceptionDetails' (type: ExceptionDetails) -> Exception details if stack strace is available.
Description: Add handler to promise with given promise object id.
- Runtime_callFunctionOn(self, functionDeclaration, **kwargs)
- Function path: Runtime.callFunctionOn
Domain: Runtime
Method name: callFunctionOn
Parameters:
Required arguments:
'functionDeclaration' (type: string) -> Declaration of the function to call.
Optional arguments:
'objectId' (type: RemoteObjectId) -> Identifier of the object to call function on. Either objectId or executionContextId should
be specified.
'arguments' (type: array) -> Call arguments. All call arguments must belong to the same JavaScript world as the target
object.
'silent' (type: boolean) -> In silent mode exceptions thrown during evaluation are not reported and do not pause
execution. Overrides `setPauseOnException` state.
'returnByValue' (type: boolean) -> Whether the result is expected to be a JSON object which should be sent by value.
'generatePreview' (type: boolean) -> Whether preview should be generated for the result.
'userGesture' (type: boolean) -> Whether execution should be treated as initiated by user in the UI.
'awaitPromise' (type: boolean) -> Whether execution should `await` for resulting value and return once awaited promise is
resolved.
'executionContextId' (type: ExecutionContextId) -> Specifies execution context which global object will be used to call function on. Either
executionContextId or objectId should be specified.
'objectGroup' (type: string) -> Symbolic group name that can be used to release multiple objects. If objectGroup is not
specified and objectId is, objectGroup will be inherited from object.
Returns:
'result' (type: RemoteObject) -> Call result.
'exceptionDetails' (type: ExceptionDetails) -> Exception details.
Description: Calls function with given declaration on the given object. Object group of the result is
inherited from the target object.
- Runtime_compileScript(self, expression, sourceURL, persistScript, **kwargs)
- Function path: Runtime.compileScript
Domain: Runtime
Method name: compileScript
Parameters:
Required arguments:
'expression' (type: string) -> Expression to compile.
'sourceURL' (type: string) -> Source url to be set for the script.
'persistScript' (type: boolean) -> Specifies whether the compiled script should be persisted.
Optional arguments:
'executionContextId' (type: ExecutionContextId) -> Specifies in which execution context to perform script run. If the parameter is omitted the
evaluation will be performed in the context of the inspected page.
Returns:
'scriptId' (type: ScriptId) -> Id of the script.
'exceptionDetails' (type: ExceptionDetails) -> Exception details.
Description: Compiles expression.
- Runtime_disable(self)
- Function path: Runtime.disable
Domain: Runtime
Method name: disable
No return value.
Description: Disables reporting of execution contexts creation.
- Runtime_discardConsoleEntries(self)
- Function path: Runtime.discardConsoleEntries
Domain: Runtime
Method name: discardConsoleEntries
No return value.
Description: Discards collected exceptions and console API calls.
- Runtime_enable(self)
- Function path: Runtime.enable
Domain: Runtime
Method name: enable
No return value.
Description: Enables reporting of execution contexts creation by means of `executionContextCreated` event.
When the reporting gets enabled the event will be sent immediately for each existing execution
context.
- Runtime_evaluate(self, expression, **kwargs)
- Function path: Runtime.evaluate
Domain: Runtime
Method name: evaluate
Parameters:
Required arguments:
'expression' (type: string) -> Expression to evaluate.
Optional arguments:
'objectGroup' (type: string) -> Symbolic group name that can be used to release multiple objects.
'includeCommandLineAPI' (type: boolean) -> Determines whether Command Line API should be available during the evaluation.
'silent' (type: boolean) -> In silent mode exceptions thrown during evaluation are not reported and do not pause
execution. Overrides `setPauseOnException` state.
'contextId' (type: ExecutionContextId) -> Specifies in which execution context to perform evaluation. If the parameter is omitted the
evaluation will be performed in the context of the inspected page.
This is mutually exclusive with `uniqueContextId`, which offers an
alternative way to identify the execution context that is more reliable
in a multi-process environment.
'returnByValue' (type: boolean) -> Whether the result is expected to be a JSON object that should be sent by value.
'generatePreview' (type: boolean) -> Whether preview should be generated for the result.
'userGesture' (type: boolean) -> Whether execution should be treated as initiated by user in the UI.
'awaitPromise' (type: boolean) -> Whether execution should `await` for resulting value and return once awaited promise is
resolved.
'throwOnSideEffect' (type: boolean) -> Whether to throw an exception if side effect cannot be ruled out during evaluation.
This implies `disableBreaks` below.
'timeout' (type: TimeDelta) -> Terminate execution after timing out (number of milliseconds).
'disableBreaks' (type: boolean) -> Disable breakpoints during execution.
'replMode' (type: boolean) -> Setting this flag to true enables `let` re-declaration and top-level `await`.
Note that `let` variables can only be re-declared if they originate from
`replMode` themselves.
'allowUnsafeEvalBlockedByCSP' (type: boolean) -> The Content Security Policy (CSP) for the target might block 'unsafe-eval'
which includes eval(), Function(), setTimeout() and setInterval()
when called with non-callable arguments. This flag bypasses CSP for this
evaluation and allows unsafe-eval. Defaults to true.
'uniqueContextId' (type: string) -> An alternative way to specify the execution context to evaluate in.
Compared to contextId that may be reused accross processes, this is guaranteed to be
system-unique, so it can be used to prevent accidental evaluation of the expression
in context different than intended (e.g. as a result of navigation accross process
boundaries).
This is mutually exclusive with `contextId`.
Returns:
'result' (type: RemoteObject) -> Evaluation result.
'exceptionDetails' (type: ExceptionDetails) -> Exception details.
Description: Evaluates expression on global object.
- Runtime_getHeapUsage(self)
- Function path: Runtime.getHeapUsage
Domain: Runtime
Method name: getHeapUsage
WARNING: This function is marked 'Experimental'!
Returns:
'usedSize' (type: number) -> Used heap size in bytes.
'totalSize' (type: number) -> Allocated heap size in bytes.
Description: Returns the JavaScript heap usage.
It is the total usage of the corresponding isolate not scoped to a particular Runtime.
- Runtime_getIsolateId(self)
- Function path: Runtime.getIsolateId
Domain: Runtime
Method name: getIsolateId
WARNING: This function is marked 'Experimental'!
Returns:
'id' (type: string) -> The isolate id.
Description: Returns the isolate id.
- Runtime_getProperties(self, objectId, **kwargs)
- Function path: Runtime.getProperties
Domain: Runtime
Method name: getProperties
Parameters:
Required arguments:
'objectId' (type: RemoteObjectId) -> Identifier of the object to return properties for.
Optional arguments:
'ownProperties' (type: boolean) -> If true, returns properties belonging only to the element itself, not to its prototype
chain.
'accessorPropertiesOnly' (type: boolean) -> If true, returns accessor properties (with getter/setter) only; internal properties are not
returned either.
'generatePreview' (type: boolean) -> Whether preview should be generated for the results.
Returns:
'result' (type: array) -> Object properties.
'internalProperties' (type: array) -> Internal object properties (only of the element itself).
'privateProperties' (type: array) -> Object private properties.
'exceptionDetails' (type: ExceptionDetails) -> Exception details.
Description: Returns properties of a given object. Object group of the result is inherited from the target
object.
- Runtime_globalLexicalScopeNames(self, **kwargs)
- Function path: Runtime.globalLexicalScopeNames
Domain: Runtime
Method name: globalLexicalScopeNames
Parameters:
Optional arguments:
'executionContextId' (type: ExecutionContextId) -> Specifies in which execution context to lookup global scope variables.
Returns:
'names' (type: array) -> No description
Description: Returns all let, const and class variables from global scope.
- Runtime_queryObjects(self, prototypeObjectId, **kwargs)
- Function path: Runtime.queryObjects
Domain: Runtime
Method name: queryObjects
Parameters:
Required arguments:
'prototypeObjectId' (type: RemoteObjectId) -> Identifier of the prototype to return objects for.
Optional arguments:
'objectGroup' (type: string) -> Symbolic group name that can be used to release the results.
Returns:
'objects' (type: RemoteObject) -> Array with objects.
- Runtime_releaseObject(self, objectId)
- Function path: Runtime.releaseObject
Domain: Runtime
Method name: releaseObject
Parameters:
Required arguments:
'objectId' (type: RemoteObjectId) -> Identifier of the object to release.
No return value.
Description: Releases remote object with given id.
- Runtime_releaseObjectGroup(self, objectGroup)
- Function path: Runtime.releaseObjectGroup
Domain: Runtime
Method name: releaseObjectGroup
Parameters:
Required arguments:
'objectGroup' (type: string) -> Symbolic object group name.
No return value.
Description: Releases all remote objects that belong to a given group.
- Runtime_removeBinding(self, name)
- Function path: Runtime.removeBinding
Domain: Runtime
Method name: removeBinding
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'name' (type: string) -> No description
No return value.
Description: This method does not remove binding function from global object but
unsubscribes current runtime agent from Runtime.bindingCalled notifications.
- Runtime_runIfWaitingForDebugger(self)
- Function path: Runtime.runIfWaitingForDebugger
Domain: Runtime
Method name: runIfWaitingForDebugger
No return value.
Description: Tells inspected instance to run if it was waiting for debugger to attach.
- Runtime_runScript(self, scriptId, **kwargs)
- Function path: Runtime.runScript
Domain: Runtime
Method name: runScript
Parameters:
Required arguments:
'scriptId' (type: ScriptId) -> Id of the script to run.
Optional arguments:
'executionContextId' (type: ExecutionContextId) -> Specifies in which execution context to perform script run. If the parameter is omitted the
evaluation will be performed in the context of the inspected page.
'objectGroup' (type: string) -> Symbolic group name that can be used to release multiple objects.
'silent' (type: boolean) -> In silent mode exceptions thrown during evaluation are not reported and do not pause
execution. Overrides `setPauseOnException` state.
'includeCommandLineAPI' (type: boolean) -> Determines whether Command Line API should be available during the evaluation.
'returnByValue' (type: boolean) -> Whether the result is expected to be a JSON object which should be sent by value.
'generatePreview' (type: boolean) -> Whether preview should be generated for the result.
'awaitPromise' (type: boolean) -> Whether execution should `await` for resulting value and return once awaited promise is
resolved.
Returns:
'result' (type: RemoteObject) -> Run result.
'exceptionDetails' (type: ExceptionDetails) -> Exception details.
Description: Runs script with given id in a given context.
- Runtime_setAsyncCallStackDepth(self, maxDepth)
- Function path: Runtime.setAsyncCallStackDepth
Domain: Runtime
Method name: setAsyncCallStackDepth
Parameters:
Required arguments:
'maxDepth' (type: integer) -> Maximum depth of async call stacks. Setting to `0` will effectively disable collecting async
call stacks (default).
No return value.
Description: Enables or disables async call stacks tracking.
- Runtime_setCustomObjectFormatterEnabled(self, enabled)
- Function path: Runtime.setCustomObjectFormatterEnabled
Domain: Runtime
Method name: setCustomObjectFormatterEnabled
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'enabled' (type: boolean) -> No description
No return value.
- Runtime_setMaxCallStackSizeToCapture(self, size)
- Function path: Runtime.setMaxCallStackSizeToCapture
Domain: Runtime
Method name: setMaxCallStackSizeToCapture
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'size' (type: integer) -> No description
No return value.
- Runtime_terminateExecution(self)
- Function path: Runtime.terminateExecution
Domain: Runtime
Method name: terminateExecution
WARNING: This function is marked 'Experimental'!
No return value.
Description: Terminate current or next JavaScript execution.
Will cancel the termination when the outer-most script execution ends.
- Schema_getDomains(self)
- Function path: Schema.getDomains
Domain: Schema
Method name: getDomains
Returns:
'domains' (type: array) -> List of supported domains.
Description: Returns supported domains.
- Security_disable(self)
- Function path: Security.disable
Domain: Security
Method name: disable
No return value.
Description: Disables tracking security state changes.
- Security_enable(self)
- Function path: Security.enable
Domain: Security
Method name: enable
No return value.
Description: Enables tracking security state changes.
- Security_handleCertificateError(self, eventId, action)
- Function path: Security.handleCertificateError
Domain: Security
Method name: handleCertificateError
Parameters:
Required arguments:
'eventId' (type: integer) -> The ID of the event.
'action' (type: CertificateErrorAction) -> The action to take on the certificate error.
No return value.
Description: Handles a certificate error that fired a certificateError event.
- Security_setIgnoreCertificateErrors(self, ignore)
- Function path: Security.setIgnoreCertificateErrors
Domain: Security
Method name: setIgnoreCertificateErrors
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'ignore' (type: boolean) -> If true, all certificate errors will be ignored.
No return value.
Description: Enable/disable whether all certificate errors should be ignored.
- Security_setOverrideCertificateErrors(self, override)
- Function path: Security.setOverrideCertificateErrors
Domain: Security
Method name: setOverrideCertificateErrors
Parameters:
Required arguments:
'override' (type: boolean) -> If true, certificate errors will be overridden.
No return value.
Description: Enable/disable overriding certificate errors. If enabled, all certificate error events need to
be handled by the DevTools client and should be answered with `handleCertificateError` commands.
- ServiceWorker_deliverPushMessage(self, origin, registrationId, data)
- Function path: ServiceWorker.deliverPushMessage
Domain: ServiceWorker
Method name: deliverPushMessage
Parameters:
Required arguments:
'origin' (type: string) -> No description
'registrationId' (type: RegistrationID) -> No description
'data' (type: string) -> No description
No return value.
- ServiceWorker_disable(self)
- Function path: ServiceWorker.disable
Domain: ServiceWorker
Method name: disable
No return value.
- ServiceWorker_dispatchPeriodicSyncEvent(self, origin, registrationId, tag)
- Function path: ServiceWorker.dispatchPeriodicSyncEvent
Domain: ServiceWorker
Method name: dispatchPeriodicSyncEvent
Parameters:
Required arguments:
'origin' (type: string) -> No description
'registrationId' (type: RegistrationID) -> No description
'tag' (type: string) -> No description
No return value.
- ServiceWorker_dispatchSyncEvent(self, origin, registrationId, tag, lastChance)
- Function path: ServiceWorker.dispatchSyncEvent
Domain: ServiceWorker
Method name: dispatchSyncEvent
Parameters:
Required arguments:
'origin' (type: string) -> No description
'registrationId' (type: RegistrationID) -> No description
'tag' (type: string) -> No description
'lastChance' (type: boolean) -> No description
No return value.
- ServiceWorker_enable(self)
- Function path: ServiceWorker.enable
Domain: ServiceWorker
Method name: enable
No return value.
- ServiceWorker_inspectWorker(self, versionId)
- Function path: ServiceWorker.inspectWorker
Domain: ServiceWorker
Method name: inspectWorker
Parameters:
Required arguments:
'versionId' (type: string) -> No description
No return value.
- ServiceWorker_setForceUpdateOnPageLoad(self, forceUpdateOnPageLoad)
- Function path: ServiceWorker.setForceUpdateOnPageLoad
Domain: ServiceWorker
Method name: setForceUpdateOnPageLoad
Parameters:
Required arguments:
'forceUpdateOnPageLoad' (type: boolean) -> No description
No return value.
- ServiceWorker_skipWaiting(self, scopeURL)
- Function path: ServiceWorker.skipWaiting
Domain: ServiceWorker
Method name: skipWaiting
Parameters:
Required arguments:
'scopeURL' (type: string) -> No description
No return value.
- ServiceWorker_startWorker(self, scopeURL)
- Function path: ServiceWorker.startWorker
Domain: ServiceWorker
Method name: startWorker
Parameters:
Required arguments:
'scopeURL' (type: string) -> No description
No return value.
- ServiceWorker_stopAllWorkers(self)
- Function path: ServiceWorker.stopAllWorkers
Domain: ServiceWorker
Method name: stopAllWorkers
No return value.
- ServiceWorker_stopWorker(self, versionId)
- Function path: ServiceWorker.stopWorker
Domain: ServiceWorker
Method name: stopWorker
Parameters:
Required arguments:
'versionId' (type: string) -> No description
No return value.
- ServiceWorker_unregister(self, scopeURL)
- Function path: ServiceWorker.unregister
Domain: ServiceWorker
Method name: unregister
Parameters:
Required arguments:
'scopeURL' (type: string) -> No description
No return value.
- ServiceWorker_updateRegistration(self, scopeURL)
- Function path: ServiceWorker.updateRegistration
Domain: ServiceWorker
Method name: updateRegistration
Parameters:
Required arguments:
'scopeURL' (type: string) -> No description
No return value.
- Storage_clearCookies(self, **kwargs)
- Function path: Storage.clearCookies
Domain: Storage
Method name: clearCookies
Parameters:
Optional arguments:
'browserContextId' (type: Browser.BrowserContextID) -> Browser context to use when called on the browser endpoint.
No return value.
Description: Clears cookies.
- Storage_clearDataForOrigin(self, origin, storageTypes)
- Function path: Storage.clearDataForOrigin
Domain: Storage
Method name: clearDataForOrigin
Parameters:
Required arguments:
'origin' (type: string) -> Security origin.
'storageTypes' (type: string) -> Comma separated list of StorageType to clear.
No return value.
Description: Clears storage for origin.
- Storage_clearTrustTokens(self, issuerOrigin)
- Function path: Storage.clearTrustTokens
Domain: Storage
Method name: clearTrustTokens
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'issuerOrigin' (type: string) -> No description
Returns:
'didDeleteTokens' (type: boolean) -> True if any tokens were deleted, false otherwise.
Description: Removes all Trust Tokens issued by the provided issuerOrigin.
Leaves other stored data, including the issuer's Redemption Records, intact.
- Storage_getCookies(self, **kwargs)
- Function path: Storage.getCookies
Domain: Storage
Method name: getCookies
Parameters:
Optional arguments:
'browserContextId' (type: Browser.BrowserContextID) -> Browser context to use when called on the browser endpoint.
Returns:
'cookies' (type: array) -> Array of cookie objects.
Description: Returns all browser cookies.
- Storage_getTrustTokens(self)
- Function path: Storage.getTrustTokens
Domain: Storage
Method name: getTrustTokens
WARNING: This function is marked 'Experimental'!
Returns:
'tokens' (type: array) -> No description
Description: Returns the number of stored Trust Tokens per issuer for the
current browsing context.
- Storage_getUsageAndQuota(self, origin)
- Function path: Storage.getUsageAndQuota
Domain: Storage
Method name: getUsageAndQuota
Parameters:
Required arguments:
'origin' (type: string) -> Security origin.
Returns:
'usage' (type: number) -> Storage usage (bytes).
'quota' (type: number) -> Storage quota (bytes).
'overrideActive' (type: boolean) -> Whether or not the origin has an active storage quota override
'usageBreakdown' (type: array) -> Storage usage per type (bytes).
Description: Returns usage and quota in bytes.
- Storage_overrideQuotaForOrigin(self, origin, **kwargs)
- Function path: Storage.overrideQuotaForOrigin
Domain: Storage
Method name: overrideQuotaForOrigin
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'origin' (type: string) -> Security origin.
Optional arguments:
'quotaSize' (type: number) -> The quota size (in bytes) to override the original quota with.
If this is called multiple times, the overridden quota will be equal to
the quotaSize provided in the final call. If this is called without
specifying a quotaSize, the quota will be reset to the default value for
the specified origin. If this is called multiple times with different
origins, the override will be maintained for each origin until it is
disabled (called without a quotaSize).
No return value.
Description: Override quota for the specified origin
- Storage_setCookies(self, cookies, **kwargs)
- Function path: Storage.setCookies
Domain: Storage
Method name: setCookies
Parameters:
Required arguments:
'cookies' (type: array) -> Cookies to be set.
Optional arguments:
'browserContextId' (type: Browser.BrowserContextID) -> Browser context to use when called on the browser endpoint.
No return value.
Description: Sets given cookies.
- Storage_trackCacheStorageForOrigin(self, origin)
- Function path: Storage.trackCacheStorageForOrigin
Domain: Storage
Method name: trackCacheStorageForOrigin
Parameters:
Required arguments:
'origin' (type: string) -> Security origin.
No return value.
Description: Registers origin to be notified when an update occurs to its cache storage list.
- Storage_trackIndexedDBForOrigin(self, origin)
- Function path: Storage.trackIndexedDBForOrigin
Domain: Storage
Method name: trackIndexedDBForOrigin
Parameters:
Required arguments:
'origin' (type: string) -> Security origin.
No return value.
Description: Registers origin to be notified when an update occurs to its IndexedDB.
- Storage_untrackCacheStorageForOrigin(self, origin)
- Function path: Storage.untrackCacheStorageForOrigin
Domain: Storage
Method name: untrackCacheStorageForOrigin
Parameters:
Required arguments:
'origin' (type: string) -> Security origin.
No return value.
Description: Unregisters origin from receiving notifications for cache storage.
- Storage_untrackIndexedDBForOrigin(self, origin)
- Function path: Storage.untrackIndexedDBForOrigin
Domain: Storage
Method name: untrackIndexedDBForOrigin
Parameters:
Required arguments:
'origin' (type: string) -> Security origin.
No return value.
Description: Unregisters origin from receiving notifications for IndexedDB.
- SystemInfo_getInfo(self)
- Function path: SystemInfo.getInfo
Domain: SystemInfo
Method name: getInfo
Returns:
'gpu' (type: GPUInfo) -> Information about the GPUs on the system.
'modelName' (type: string) -> A platform-dependent description of the model of the machine. On Mac OS, this is, for
example, 'MacBookPro'. Will be the empty string if not supported.
'modelVersion' (type: string) -> A platform-dependent description of the version of the machine. On Mac OS, this is, for
example, '10.1'. Will be the empty string if not supported.
'commandLine' (type: string) -> The command line string used to launch the browser. Will be the empty string if not
supported.
Description: Returns information about the system.
- SystemInfo_getProcessInfo(self)
- Function path: SystemInfo.getProcessInfo
Domain: SystemInfo
Method name: getProcessInfo
Returns:
'processInfo' (type: array) -> An array of process info blocks.
Description: Returns information about all running processes.
- Target_activateTarget(self, targetId)
- Function path: Target.activateTarget
Domain: Target
Method name: activateTarget
Parameters:
Required arguments:
'targetId' (type: TargetID) -> No description
No return value.
Description: Activates (focuses) the target.
- Target_attachToBrowserTarget(self)
- Function path: Target.attachToBrowserTarget
Domain: Target
Method name: attachToBrowserTarget
WARNING: This function is marked 'Experimental'!
Returns:
'sessionId' (type: SessionID) -> Id assigned to the session.
Description: Attaches to the browser target, only uses flat sessionId mode.
- Target_attachToTarget(self, targetId, **kwargs)
- Function path: Target.attachToTarget
Domain: Target
Method name: attachToTarget
Parameters:
Required arguments:
'targetId' (type: TargetID) -> No description
Optional arguments:
'flatten' (type: boolean) -> Enables "flat" access to the session via specifying sessionId attribute in the commands.
We plan to make this the default, deprecate non-flattened mode,
and eventually retire it. See crbug.com/991325.
Returns:
'sessionId' (type: SessionID) -> Id assigned to the session.
Description: Attaches to the target with given id.
- Target_closeTarget(self, targetId)
- Function path: Target.closeTarget
Domain: Target
Method name: closeTarget
Parameters:
Required arguments:
'targetId' (type: TargetID) -> No description
Returns:
'success' (type: boolean) -> Always set to true. If an error occurs, the response indicates protocol error.
Description: Closes the target. If the target is a page that gets closed too.
- Target_createBrowserContext(self, **kwargs)
- Function path: Target.createBrowserContext
Domain: Target
Method name: createBrowserContext
WARNING: This function is marked 'Experimental'!
Parameters:
Optional arguments:
'disposeOnDetach' (type: boolean) -> If specified, disposes this context when debugging session disconnects.
'proxyServer' (type: string) -> Proxy server, similar to the one passed to --proxy-server
'proxyBypassList' (type: string) -> Proxy bypass list, similar to the one passed to --proxy-bypass-list
Returns:
'browserContextId' (type: Browser.BrowserContextID) -> The id of the context created.
Description: Creates a new empty BrowserContext. Similar to an incognito profile but you can have more than
one.
- Target_createTarget(self, url, **kwargs)
- Function path: Target.createTarget
Domain: Target
Method name: createTarget
Parameters:
Required arguments:
'url' (type: string) -> The initial URL the page will be navigated to. An empty string indicates about:blank.
Optional arguments:
'width' (type: integer) -> Frame width in DIP (headless chrome only).
'height' (type: integer) -> Frame height in DIP (headless chrome only).
'browserContextId' (type: Browser.BrowserContextID) -> The browser context to create the page in.
'enableBeginFrameControl' (type: boolean) -> Whether BeginFrames for this target will be controlled via DevTools (headless chrome only,
not supported on MacOS yet, false by default).
'newWindow' (type: boolean) -> Whether to create a new Window or Tab (chrome-only, false by default).
'background' (type: boolean) -> Whether to create the target in background or foreground (chrome-only,
false by default).
Returns:
'targetId' (type: TargetID) -> The id of the page opened.
Description: Creates a new page.
- Target_detachFromTarget(self, **kwargs)
- Function path: Target.detachFromTarget
Domain: Target
Method name: detachFromTarget
Parameters:
Optional arguments:
'sessionId' (type: SessionID) -> Session to detach.
'targetId' (type: TargetID) -> Deprecated.
No return value.
Description: Detaches session with given id.
- Target_disposeBrowserContext(self, browserContextId)
- Function path: Target.disposeBrowserContext
Domain: Target
Method name: disposeBrowserContext
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'browserContextId' (type: Browser.BrowserContextID) -> No description
No return value.
Description: Deletes a BrowserContext. All the belonging pages will be closed without calling their
beforeunload hooks.
- Target_exposeDevToolsProtocol(self, targetId, **kwargs)
- Function path: Target.exposeDevToolsProtocol
Domain: Target
Method name: exposeDevToolsProtocol
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'targetId' (type: TargetID) -> No description
Optional arguments:
'bindingName' (type: string) -> Binding name, 'cdp' if not specified.
No return value.
Description: Inject object to the target's main frame that provides a communication
channel with browser target.
Injected object will be available as `window[bindingName]`.
The object has the follwing API:
- `binding.send(json)` - a method to send messages over the remote debugging protocol
- `binding.onmessage = json => handleMessage(json)` - a callback that will be called for the protocol notifications and command responses.
- Target_getBrowserContexts(self)
- Function path: Target.getBrowserContexts
Domain: Target
Method name: getBrowserContexts
WARNING: This function is marked 'Experimental'!
Returns:
'browserContextIds' (type: array) -> An array of browser context ids.
Description: Returns all browser contexts created with `Target.createBrowserContext` method.
- Target_getTargetInfo(self, **kwargs)
- Function path: Target.getTargetInfo
Domain: Target
Method name: getTargetInfo
WARNING: This function is marked 'Experimental'!
Parameters:
Optional arguments:
'targetId' (type: TargetID) -> No description
Returns:
'targetInfo' (type: TargetInfo) -> No description
Description: Returns information about a target.
- Target_getTargets(self)
- Function path: Target.getTargets
Domain: Target
Method name: getTargets
Returns:
'targetInfos' (type: array) -> The list of targets.
Description: Retrieves a list of available targets.
- Target_sendMessageToTarget(self, message, **kwargs)
- Function path: Target.sendMessageToTarget
Domain: Target
Method name: sendMessageToTarget
Parameters:
Required arguments:
'message' (type: string) -> No description
Optional arguments:
'sessionId' (type: SessionID) -> Identifier of the session.
'targetId' (type: TargetID) -> Deprecated.
No return value.
Description: Sends protocol message over session with given id.
Consider using flat mode instead; see commands attachToTarget, setAutoAttach,
and crbug.com/991325.
- Target_setAutoAttach(self, autoAttach, waitForDebuggerOnStart, **kwargs)
- Function path: Target.setAutoAttach
Domain: Target
Method name: setAutoAttach
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'autoAttach' (type: boolean) -> Whether to auto-attach to related targets.
'waitForDebuggerOnStart' (type: boolean) -> Whether to pause new targets when attaching to them. Use `Runtime.runIfWaitingForDebugger`
to run paused targets.
Optional arguments:
'flatten' (type: boolean) -> Enables "flat" access to the session via specifying sessionId attribute in the commands.
We plan to make this the default, deprecate non-flattened mode,
and eventually retire it. See crbug.com/991325.
No return value.
Description: Controls whether to automatically attach to new targets which are considered to be related to
this one. When turned on, attaches to all existing related targets as well. When turned off,
automatically detaches from all currently attached targets.
- Target_setDiscoverTargets(self, discover)
- Function path: Target.setDiscoverTargets
Domain: Target
Method name: setDiscoverTargets
Parameters:
Required arguments:
'discover' (type: boolean) -> Whether to discover available targets.
No return value.
Description: Controls whether to discover available targets and notify via
`targetCreated/targetInfoChanged/targetDestroyed` events.
- Target_setRemoteLocations(self, locations)
- Function path: Target.setRemoteLocations
Domain: Target
Method name: setRemoteLocations
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'locations' (type: array) -> List of remote locations.
No return value.
Description: Enables target discovery for the specified locations, when `setDiscoverTargets` was set to
`true`.
- Tethering_bind(self, port)
- Function path: Tethering.bind
Domain: Tethering
Method name: bind
Parameters:
Required arguments:
'port' (type: integer) -> Port number to bind.
No return value.
Description: Request browser port binding.
- Tethering_unbind(self, port)
- Function path: Tethering.unbind
Domain: Tethering
Method name: unbind
Parameters:
Required arguments:
'port' (type: integer) -> Port number to unbind.
No return value.
Description: Request browser port unbinding.
- Tracing_end(self)
- Function path: Tracing.end
Domain: Tracing
Method name: end
No return value.
Description: Stop trace events collection.
- Tracing_getCategories(self)
- Function path: Tracing.getCategories
Domain: Tracing
Method name: getCategories
Returns:
'categories' (type: array) -> A list of supported tracing categories.
Description: Gets supported tracing categories.
- Tracing_recordClockSyncMarker(self, syncId)
- Function path: Tracing.recordClockSyncMarker
Domain: Tracing
Method name: recordClockSyncMarker
Parameters:
Required arguments:
'syncId' (type: string) -> The ID of this clock sync marker
No return value.
Description: Record a clock sync marker in the trace.
- Tracing_requestMemoryDump(self, **kwargs)
- Function path: Tracing.requestMemoryDump
Domain: Tracing
Method name: requestMemoryDump
Parameters:
Optional arguments:
'deterministic' (type: boolean) -> Enables more deterministic results by forcing garbage collection
'levelOfDetail' (type: MemoryDumpLevelOfDetail) -> Specifies level of details in memory dump. Defaults to "detailed".
Returns:
'dumpGuid' (type: string) -> GUID of the resulting global memory dump.
'success' (type: boolean) -> True iff the global memory dump succeeded.
Description: Request a global memory dump.
- Tracing_start(self, **kwargs)
- Function path: Tracing.start
Domain: Tracing
Method name: start
Parameters:
Optional arguments:
'categories' (type: string) -> Category/tag filter
'options' (type: string) -> Tracing options
'bufferUsageReportingInterval' (type: number) -> If set, the agent will issue bufferUsage events at this interval, specified in milliseconds
'transferMode' (type: string) -> Whether to report trace events as series of dataCollected events or to save trace to a
stream (defaults to `ReportEvents`).
'streamFormat' (type: StreamFormat) -> Trace data format to use. This only applies when using `ReturnAsStream`
transfer mode (defaults to `json`).
'streamCompression' (type: StreamCompression) -> Compression format to use. This only applies when using `ReturnAsStream`
transfer mode (defaults to `none`)
'traceConfig' (type: TraceConfig) -> No description
'perfettoConfig' (type: string) -> Base64-encoded serialized perfetto.protos.TraceConfig protobuf message
When specified, the parameters `categories`, `options`, `traceConfig`
are ignored. (Encoded as a base64 string when passed over JSON)
'tracingBackend' (type: TracingBackend) -> Backend type (defaults to `auto`)
No return value.
Description: Start trace events collection.
- WebAudio_disable(self)
- Function path: WebAudio.disable
Domain: WebAudio
Method name: disable
No return value.
Description: Disables the WebAudio domain.
- WebAudio_enable(self)
- Function path: WebAudio.enable
Domain: WebAudio
Method name: enable
No return value.
Description: Enables the WebAudio domain and starts sending context lifetime events.
- WebAudio_getRealtimeData(self, contextId)
- Function path: WebAudio.getRealtimeData
Domain: WebAudio
Method name: getRealtimeData
Parameters:
Required arguments:
'contextId' (type: GraphObjectId) -> No description
Returns:
'realtimeData' (type: ContextRealtimeData) -> No description
Description: Fetch the realtime data from the registered contexts.
- WebAuthn_addCredential(self, authenticatorId, credential)
- Function path: WebAuthn.addCredential
Domain: WebAuthn
Method name: addCredential
Parameters:
Required arguments:
'authenticatorId' (type: AuthenticatorId) -> No description
'credential' (type: Credential) -> No description
No return value.
Description: Adds the credential to the specified authenticator.
- WebAuthn_addVirtualAuthenticator(self, options)
- Function path: WebAuthn.addVirtualAuthenticator
Domain: WebAuthn
Method name: addVirtualAuthenticator
Parameters:
Required arguments:
'options' (type: VirtualAuthenticatorOptions) -> No description
Returns:
'authenticatorId' (type: AuthenticatorId) -> No description
Description: Creates and adds a virtual authenticator.
- WebAuthn_clearCredentials(self, authenticatorId)
- Function path: WebAuthn.clearCredentials
Domain: WebAuthn
Method name: clearCredentials
Parameters:
Required arguments:
'authenticatorId' (type: AuthenticatorId) -> No description
No return value.
Description: Clears all the credentials from the specified device.
- WebAuthn_disable(self)
- Function path: WebAuthn.disable
Domain: WebAuthn
Method name: disable
No return value.
Description: Disable the WebAuthn domain.
- WebAuthn_enable(self)
- Function path: WebAuthn.enable
Domain: WebAuthn
Method name: enable
No return value.
Description: Enable the WebAuthn domain and start intercepting credential storage and
retrieval with a virtual authenticator.
- WebAuthn_getCredential(self, authenticatorId, credentialId)
- Function path: WebAuthn.getCredential
Domain: WebAuthn
Method name: getCredential
Parameters:
Required arguments:
'authenticatorId' (type: AuthenticatorId) -> No description
'credentialId' (type: string) -> No description
Returns:
'credential' (type: Credential) -> No description
Description: Returns a single credential stored in the given virtual authenticator that
matches the credential ID.
- WebAuthn_getCredentials(self, authenticatorId)
- Function path: WebAuthn.getCredentials
Domain: WebAuthn
Method name: getCredentials
Parameters:
Required arguments:
'authenticatorId' (type: AuthenticatorId) -> No description
Returns:
'credentials' (type: array) -> No description
Description: Returns all the credentials stored in the given virtual authenticator.
- WebAuthn_removeCredential(self, authenticatorId, credentialId)
- Function path: WebAuthn.removeCredential
Domain: WebAuthn
Method name: removeCredential
Parameters:
Required arguments:
'authenticatorId' (type: AuthenticatorId) -> No description
'credentialId' (type: string) -> No description
No return value.
Description: Removes a credential from the authenticator.
- WebAuthn_removeVirtualAuthenticator(self, authenticatorId)
- Function path: WebAuthn.removeVirtualAuthenticator
Domain: WebAuthn
Method name: removeVirtualAuthenticator
Parameters:
Required arguments:
'authenticatorId' (type: AuthenticatorId) -> No description
No return value.
Description: Removes the given authenticator.
- WebAuthn_setAutomaticPresenceSimulation(self, authenticatorId, enabled)
- Function path: WebAuthn.setAutomaticPresenceSimulation
Domain: WebAuthn
Method name: setAutomaticPresenceSimulation
Parameters:
Required arguments:
'authenticatorId' (type: AuthenticatorId) -> No description
'enabled' (type: boolean) -> No description
No return value.
Description: Sets whether tests of user presence will succeed immediately (if true) or fail to resolve (if false) for an authenticator.
The default is true.
- WebAuthn_setUserVerified(self, authenticatorId, isUserVerified)
- Function path: WebAuthn.setUserVerified
Domain: WebAuthn
Method name: setUserVerified
Parameters:
Required arguments:
'authenticatorId' (type: AuthenticatorId) -> No description
'isUserVerified' (type: boolean) -> No description
No return value.
Description: Sets whether User Verification succeeds or fails for an authenticator.
The default is true.
Methods inherited from ChromeController.manager_base.ChromeInterface:
- asynchronous_command(self, command, **kwargs)
- Forward a command to the remote chrome instance via the transport
connection, returning the send_id for the sent command.
This is primarily useful for writing intentionally async code that
handles it's own responses via the install_message_handler facilities.
- close(self)
- drain_transport(self)
- "Drain" the transport connection.
This command simply returns all waiting messages sent from the remote chrome
instance. This can be useful when waiting for a specific asynchronous message
from chrome, but higher level calls are better suited for managing wait-for-message
type needs.
- for_existing_tab(self, tab_id, *args, **kwargs)
- Create a interface object for an existing tab.
tab_id is a UUID object as lsited in the transport tab_id_map
- process_available(self)
- Process all messages in the socket rx queue.
Will block for at least 100 milliseconds.
- synchronous_command(self, *args, **kwargs)
- Forward a command to the remote chrome instance via the transport
connection, and check the return for an error.
If the command resulted in an error, a `ChromeController.ChromeError` is raised,
with the error string containing the response from the remote
chrome instance describing the problem and it's cause.
Otherwise, the decoded json data-structure returned from the remote instance is
returned.
Methods inherited from ChromeController.manager_base.ChromeListenerMixin:
- clear_content_listener_cache(self)
- The handlers installed by install_listener_for_content() have some persistant
storage in the class to allow tracking request-id -> response body mappings.
These shouldn't take much RAM, but extremely long chromium execution times can
conceivably cause them to grow excessively.
This call clears them. Note that calling this while a request is in-flight may cause
strange callback errors.
- install_listener_for_content(self, handler)
- Install a content handler.
`handler` will be called for each received content item.
Internally, this involves a larger set of handlers to track the mappings of request-id to actual URL,
and asynchronously invoked Network.getResponseBody against the chromium tab instance.
The handler is invoked as:
`handler(self, req_url, response_body)` where self is the pointer to the local ChromeInterface instance.
- install_message_handler(self, handler)
- Add handler `handler` to the list of message handlers that will be called on all received messages.
The handler will be called with the tab context for each message the tab generates.
NOTE: Handler call order is not specified!
- remove_all_handlers(self)
- Remove all message handlers for the current tab.
- remove_handlers(self, handler)
- Remove handler `handler` from the list of message handlers that will be called
on all received messages for the current tab.
If the the handler is not present, a KeyError will be raised.
- set_filter_func(self, func)
- Specify a function with a signature `func(url, meta)` to be used as the precondition filter
for requesting full fetch results from the browser.
Precondition check before executing the fetch of content for url `url` from the browser.
This is mostly useful for preventing the overhead of requesting large binary files multiple times.
Overriding and returning false on later requests prevents additionl `Network.getResponseBody` invocations
being set to the browser.
Note that specifying func=None is a special case where a empty pass function that always returns true will
be used.
Additionally, this function is *per tab*, and not automatically copied to a new tab when it is created.
Data descriptors inherited from ChromeController.manager_base.ChromeListenerMixin:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|