Skip to content

Protocol Events

This section documents the Chrome DevTools Protocol event constants and handlers used by Pydoll.

Page Events

pydoll.protocol.page.events

PageEvent

Bases: str, Enum

Events from the Page domain of the Chrome DevTools Protocol.

This enumeration contains the names of Page-related events that can be received from the Chrome DevTools Protocol. These events provide information about page lifecycle, frame navigation, JavaScript dialogs, and other page-related activities.

DOM_CONTENT_EVENT_FIRED class-attribute instance-attribute
DOM_CONTENT_EVENT_FIRED = 'Page.domContentEventFired'

Fired when DOMContentLoaded event is fired.

PARAMETER DESCRIPTION
timestamp

Timestamp when the event occurred.

TYPE: MonotonicTime

FILE_CHOOSER_OPENED class-attribute instance-attribute
FILE_CHOOSER_OPENED = 'Page.fileChooserOpened'

Emitted only when page.interceptFileChooser is enabled.

PARAMETER DESCRIPTION
frameId

Id of the frame containing input node.

TYPE: FrameId

mode

Input mode. Allowed Values: selectSingle, selectMultiple

TYPE: str

backendNodeId

Input node id. Only present for file choosers opened via an element.

TYPE: BackendNodeId

FRAME_ATTACHED class-attribute instance-attribute
FRAME_ATTACHED = 'Page.frameAttached'

Fired when frame has been attached to its parent.

PARAMETER DESCRIPTION
frameId

Id of the frame that has been attached.

TYPE: FrameId

parentFrameId

Parent frame identifier.

TYPE: FrameId

stack

JavaScript stack trace of when frame was attached, only set if frame initiated from script.

TYPE: StackTrace

FRAME_DETACHED class-attribute instance-attribute
FRAME_DETACHED = 'Page.frameDetached'

Fired when frame has been detached from its parent.

PARAMETER DESCRIPTION
frameId

Id of the frame that has been detached.

TYPE: FrameId

reason

Reason why the frame was detached. Allowed Values: remove, swap

TYPE: str

FRAME_NAVIGATED class-attribute instance-attribute
FRAME_NAVIGATED = 'Page.frameNavigated'

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

PARAMETER DESCRIPTION
frame

Frame object.

TYPE: Frame

type

Type of navigation.

TYPE: NavigationType

INTERSTITIAL_HIDDEN class-attribute instance-attribute
INTERSTITIAL_HIDDEN = 'Page.interstitialHidden'

Fired when interstitial page was hidden.

INTERSTITIAL_SHOWN class-attribute instance-attribute
INTERSTITIAL_SHOWN = 'Page.interstitialShown'

Fired when interstitial page was shown.

JAVASCRIPT_DIALOG_CLOSED class-attribute instance-attribute
JAVASCRIPT_DIALOG_CLOSED = 'Page.javascriptDialogClosed'

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

PARAMETER DESCRIPTION
frameId

Frame id.

TYPE: FrameId

result

Whether dialog was confirmed.

TYPE: bool

userInput

User input in case of prompt.

TYPE: str

JAVASCRIPT_DIALOG_OPENING class-attribute instance-attribute
JAVASCRIPT_DIALOG_OPENING = 'Page.javascriptDialogOpening'

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

PARAMETER DESCRIPTION
url

Frame url.

TYPE: str

frameId

Frame id.

TYPE: FrameId

message

Message that will be displayed by the dialog.

TYPE: str

type

Dialog type.

TYPE: DialogType

hasBrowserHandler

True if browser is capable showing or acting on the given dialog. When browser has no dialog handler for given target, calling alert while Page domain is engaged will stall the page execution. Execution can be resumed via calling Page.handleJavaScriptDialog.

TYPE: bool

defaultPrompt

Default dialog prompt.

TYPE: str

LIFECYCLE_EVENT class-attribute instance-attribute
LIFECYCLE_EVENT = 'Page.lifecycleEvent'

Fired for lifecycle events (navigation, load, paint, etc) in the current target (including local frames).

PARAMETER DESCRIPTION
frameId

Id of the frame.

TYPE: FrameId

loaderId

Loader identifier. Empty string if the request is fetched from worker.

TYPE: LoaderId

name

Lifecycle event name.

TYPE: str

timestamp

Timestamp when the event occurred.

TYPE: MonotonicTime

LOAD_EVENT_FIRED class-attribute instance-attribute
LOAD_EVENT_FIRED = 'Page.loadEventFired'

Fired when the page load event has fired.

PARAMETER DESCRIPTION
timestamp

Timestamp when the event occurred.

TYPE: MonotonicTime

WINDOW_OPEN class-attribute instance-attribute
WINDOW_OPEN = 'Page.windowOpen'

Fired when a new window is going to be opened, via window.open(), link click, form submission, etc.

PARAMETER DESCRIPTION
url

The URL for the new window.

TYPE: str

windowName

Window name.

TYPE: str

windowFeatures

An array of enabled window features.

TYPE: array[str]

userGesture

Whether or not it was triggered by user gesture.

TYPE: bool

BACK_FORWARD_CACHE_NOT_USED class-attribute instance-attribute
BACK_FORWARD_CACHE_NOT_USED = 'Page.backForwardCacheNotUsed'

Fired for failed bfcache history navigations if BackForwardCache feature is enabled. Do not assume any ordering with the Page.frameNavigated event. This event is fired only for main-frame history navigation where the document changes (non-same-document navigations), when bfcache navigation fails.

PARAMETER DESCRIPTION
loaderId

The loader id for the associated navigation.

TYPE: LoaderId

frameId

The frame id of the associated frame.

TYPE: FrameId

notRestoredExplanations

Array of reasons why the page could not be cached. This must not be empty.

TYPE: array[BackForwardCacheNotRestoredExplanation]

notRestoredExplanationsTree

Tree structure of reasons why the page could not be cached for each frame.

TYPE: BackForwardCacheNotRestoredExplanationTree

COMPILATION_CACHE_PRODUCED class-attribute instance-attribute
COMPILATION_CACHE_PRODUCED = 'Page.compilationCacheProduced'

Issued for every compilation cache generated. Is only available if Page.setGenerateCompilationCache is enabled.

PARAMETER DESCRIPTION
url

The URL of the document whose compilation cache was produced.

TYPE: str

data

Base64-encoded data (Encoded as a base64 string when passed over JSON).

TYPE: str

DOCUMENT_OPENED class-attribute instance-attribute
DOCUMENT_OPENED = 'Page.documentOpened'

Fired when opening document to write to.

PARAMETER DESCRIPTION
frame

Frame object.

TYPE: Frame

FRAME_REQUESTED_NAVIGATION class-attribute instance-attribute
FRAME_REQUESTED_NAVIGATION = 'Page.frameRequestedNavigation'

Fired when a renderer-initiated navigation is requested. Navigation may still be cancelled after the event is issued.

PARAMETER DESCRIPTION
frameId

Id of the frame that is being navigated.

TYPE: FrameId

reason

The reason for the navigation.

TYPE: ClientNavigationReason

url

The destination URL for the requested navigation.

TYPE: str

disposition

The disposition for the navigation.

TYPE: ClientNavigationDisposition

FRAME_RESIZED class-attribute instance-attribute
FRAME_RESIZED = 'Page.frameResized'

Fired when frame has been resized.

FRAME_STARTED_LOADING class-attribute instance-attribute
FRAME_STARTED_LOADING = 'Page.frameStartedLoading'

Fired when frame has started loading.

PARAMETER DESCRIPTION
frameId

Id of the frame that has started loading.

TYPE: FrameId

FRAME_STARTED_NAVIGATING class-attribute instance-attribute
FRAME_STARTED_NAVIGATING = 'Page.frameStartedNavigating'

Fired when a navigation starts. This event is fired for both renderer-initiated and browser-initiated navigations. For renderer-initiated navigations, the event is fired after frameRequestedNavigation. Navigation may still be cancelled after the event is issued. Multiple events can be fired for a single navigation, for example, when a same-document navigation becomes a cross-document navigation (such as in the case of a frameset).

PARAMETER DESCRIPTION
frameId

ID of the frame that is being navigated.

TYPE: FrameId

url

The URL the navigation started with. The final URL can be different.

TYPE: str

loaderId

Loader identifier. Even though it is present in case of same-document navigation, the previously committed loaderId would not change unless the navigation changes from a same-document to a cross-document navigation.

TYPE: LoaderId

navigationType

Type of navigation. Allowed Values: reload, reloadBypassingCache, restore, restoreWithPost, historySameDocument, historyDifferentDocument, sameDocument, differentDocument

TYPE: str

FRAME_STOPPED_LOADING class-attribute instance-attribute
FRAME_STOPPED_LOADING = 'Page.frameStoppedLoading'

Fired when frame has stopped loading.

PARAMETER DESCRIPTION
frameId

Id of the frame that has stopped loading.

TYPE: FrameId

FRAME_SUBTREE_WILL_BE_DETACHED class-attribute instance-attribute
FRAME_SUBTREE_WILL_BE_DETACHED = 'Page.frameSubtreeWillBeDetached'

Fired before frame subtree is detached. Emitted before any frame of the subtree is actually detached.

PARAMETER DESCRIPTION
frameId

Id of the frame that is the root of the subtree that will be detached.

TYPE: FrameId

NAVIGATED_WITHIN_DOCUMENT class-attribute instance-attribute
NAVIGATED_WITHIN_DOCUMENT = 'Page.navigatedWithinDocument'

Fired when same-document navigation happens, e.g. due to history API usage or anchor navigation.

PARAMETER DESCRIPTION
frameId

Id of the frame.

TYPE: FrameId

url

Frame's new url.

TYPE: str

navigationType

Navigation type. Allowed Values: fragment, historyApi, other

TYPE: str

SCREENCAST_FRAME class-attribute instance-attribute
SCREENCAST_FRAME = 'Page.screencastFrame'

Compressed image data requested by the startScreencast.

PARAMETER DESCRIPTION
data

Base64-encoded compressed image.

TYPE: str

metadata

Screencast frame metadata.

TYPE: ScreencastFrameMetadata

sessionId

Frame number.

TYPE: int

SCREENCAST_VISIBILITY_CHANGED class-attribute instance-attribute
SCREENCAST_VISIBILITY_CHANGED = 'Page.screencastVisibilityChanged'

Fired when the page with currently enabled screencast was shown or hidden.

PARAMETER DESCRIPTION
visible

True if the page is visible.

TYPE: bool

Network Events

pydoll.protocol.network.events

NetworkEvent

Bases: str, Enum

Events from the Network domain of the Chrome DevTools Protocol.

This enumeration contains the names of Network-related events that can be received from the Chrome DevTools Protocol. These events provide information about network activities, such as requests, responses, and WebSocket communications.

DATA_RECEIVED class-attribute instance-attribute
DATA_RECEIVED = 'Network.dataReceived'

Fired when data chunk was received over the network.

PARAMETER DESCRIPTION
requestId

Request identifier.

TYPE: RequestId

timestamp

Timestamp.

TYPE: MonotonicTime

dataLength

Data chunk length.

TYPE: int

encodedDataLength

Actual bytes received (might be less than dataLength for compressed encodings).

TYPE: int

data

Data that was received. (Encoded as a base64 string when passed over JSON)

TYPE: str

EVENT_SOURCE_MESSAGE_RECEIVED class-attribute instance-attribute
EVENT_SOURCE_MESSAGE_RECEIVED = 'Network.eventSourceMessageReceived'

Fired when EventSource message is received.

PARAMETER DESCRIPTION
requestId

Request identifier.

TYPE: RequestId

timestamp

Timestamp.

TYPE: MonotonicTime

eventName

Message type.

TYPE: str

eventId

Message identifier.

TYPE: str

data

Message content.

TYPE: str

LOADING_FAILED class-attribute instance-attribute
LOADING_FAILED = 'Network.loadingFailed'

Fired when HTTP request has failed to load.

PARAMETER DESCRIPTION
requestId

Request identifier.

TYPE: RequestId

timestamp

Timestamp.

TYPE: MonotonicTime

type

Resource type.

TYPE: ResourceType

errorText

Error message. List of network errors: https://cs.chromium.org/chromium/src/net/base/net_error_list.h

TYPE: str

canceled

True if loading was canceled.

TYPE: bool

blockedReason

The reason why loading was blocked, if any.

TYPE: BlockedReason

corsErrorStatus

The reason why loading was blocked by CORS, if any.

TYPE: CorsErrorStatus

LOADING_FINISHED class-attribute instance-attribute
LOADING_FINISHED = 'Network.loadingFinished'

Fired when HTTP request has finished loading.

PARAMETER DESCRIPTION
requestId

Request identifier.

TYPE: RequestId

timestamp

Timestamp.

TYPE: MonotonicTime

encodedDataLength

Total number of bytes received for this request.

TYPE: number

REQUEST_SERVED_FROM_CACHE class-attribute instance-attribute
REQUEST_SERVED_FROM_CACHE = 'Network.requestServedFromCache'

Fired if request ended up loading from cache.

PARAMETER DESCRIPTION
requestId

Request identifier.

TYPE: RequestId

REQUEST_WILL_BE_SENT class-attribute instance-attribute
REQUEST_WILL_BE_SENT = 'Network.requestWillBeSent'

Fired when page is about to send HTTP request.

PARAMETER DESCRIPTION
requestId

Request identifier.

TYPE: RequestId

loaderId

Loader identifier. Empty string if the request is fetched from worker.

TYPE: LoaderId

documentURL

URL of the document this request is loaded for.

TYPE: str

request

Request data.

TYPE: Request

timestamp

Timestamp.

TYPE: MonotonicTime

wallTime

Timestamp.

TYPE: TimeSinceEpoch

initiator

Request initiator.

TYPE: Initiator

redirectHasExtraInfo

In the case that redirectResponse is populated, this flag indicates whether requestWillBeSentExtraInfo and responseReceivedExtraInfo events will be or were emitted for the request which was just redirected.

TYPE: bool

redirectResponse

Redirect response data.

TYPE: Response

type

Type of this resource.

TYPE: ResourceType

frameId

Frame identifier.

TYPE: FrameId

hasUserGesture

Whether the request is initiated by a user gesture. Defaults to false.

TYPE: bool

RESPONSE_RECEIVED class-attribute instance-attribute
RESPONSE_RECEIVED = 'Network.responseReceived'

Fired when HTTP response is available.

PARAMETER DESCRIPTION
requestId

Request identifier.

TYPE: RequestId

loaderId

Loader identifier. Empty string if the request is fetched from worker.

TYPE: LoaderId

timestamp

Timestamp.

TYPE: MonotonicTime

type

Resource type.

TYPE: ResourceType

response

Response data.

TYPE: Response

hasExtraInfo

Indicates whether requestWillBeSentExtraInfo and responseReceivedExtraInfo events will be or were emitted for this request.

TYPE: bool

frameId

Frame identifier.

TYPE: FrameId

WEBSOCKET_CLOSED class-attribute instance-attribute
WEBSOCKET_CLOSED = 'Network.webSocketClosed'

Fired when WebSocket is closed.

PARAMETER DESCRIPTION
requestId

Request identifier.

TYPE: RequestId

timestamp

Timestamp.

TYPE: MonotonicTime

WEBSOCKET_CREATED class-attribute instance-attribute
WEBSOCKET_CREATED = 'Network.webSocketCreated'

Fired upon WebSocket creation.

PARAMETER DESCRIPTION
requestId

Request identifier.

TYPE: RequestId

url

WebSocket request URL.

TYPE: str

initiator

Request initiator.

TYPE: Initiator

WEBSOCKET_FRAME_ERROR class-attribute instance-attribute
WEBSOCKET_FRAME_ERROR = 'Network.webSocketFrameError'

Fired when WebSocket message error occurs.

PARAMETER DESCRIPTION
requestId

Request identifier.

TYPE: RequestId

timestamp

Timestamp.

TYPE: MonotonicTime

errorMessage

WebSocket error message.

TYPE: str

WEBSOCKET_FRAME_RECEIVED class-attribute instance-attribute
WEBSOCKET_FRAME_RECEIVED = 'Network.webSocketFrameReceived'

Fired when WebSocket message is received.

PARAMETER DESCRIPTION
requestId

Request identifier.

TYPE: RequestId

timestamp

Timestamp.

TYPE: MonotonicTime

response

WebSocket response data.

TYPE: WebSocketFrame

WEBSOCKET_FRAME_SENT class-attribute instance-attribute
WEBSOCKET_FRAME_SENT = 'Network.webSocketFrameSent'

Fired when WebSocket message is sent.

PARAMETER DESCRIPTION
requestId

Request identifier.

TYPE: RequestId

timestamp

Timestamp.

TYPE: MonotonicTime

response

WebSocket response data.

TYPE: WebSocketFrame

WEBSOCKET_HANDSHAKE_RESPONSE_RECEIVED class-attribute instance-attribute
WEBSOCKET_HANDSHAKE_RESPONSE_RECEIVED = 'Network.webSocketHandshakeResponseReceived'

Fired when WebSocket handshake response becomes available.

PARAMETER DESCRIPTION
requestId

Request identifier.

TYPE: RequestId

timestamp

Timestamp.

TYPE: MonotonicTime

response

WebSocket response data.

TYPE: WebSocketResponse

WEBSOCKET_WILL_SEND_HANDSHAKE_REQUEST class-attribute instance-attribute
WEBSOCKET_WILL_SEND_HANDSHAKE_REQUEST = 'Network.webSocketWillSendHandshakeRequest'

Fired when WebSocket is about to initiate handshake.

PARAMETER DESCRIPTION
requestId

Request identifier.

TYPE: RequestId

timestamp

Timestamp.

TYPE: MonotonicTime

wallTime

UTC Timestamp.

TYPE: TimeSinceEpoch

request

WebSocket request data.

TYPE: WebSocketRequest

WEBTRANSPORT_CLOSED class-attribute instance-attribute
WEBTRANSPORT_CLOSED = 'Network.webTransportClosed'

Fired when WebTransport is disposed.

PARAMETER DESCRIPTION
transportId

WebTransport identifier.

TYPE: RequestId

timestamp

Timestamp.

TYPE: MonotonicTime

WEBTRANSPORT_CONNECTION_ESTABLISHED class-attribute instance-attribute
WEBTRANSPORT_CONNECTION_ESTABLISHED = 'Network.webTransportConnectionEstablished'

Fired when WebTransport handshake is finished.

PARAMETER DESCRIPTION
transportId

WebTransport identifier.

TYPE: RequestId

timestamp

Timestamp.

TYPE: MonotonicTime

WEBTRANSPORT_CREATED class-attribute instance-attribute
WEBTRANSPORT_CREATED = 'Network.webTransportCreated'

Fired upon WebTransport creation.

PARAMETER DESCRIPTION
transportId

WebTransport identifier.

TYPE: RequestId

url

WebTransport request URL.

TYPE: str

timestamp

Timestamp.

TYPE: MonotonicTime

initiator

Request initiator.

TYPE: Initiator

DIRECT_TCP_SOCKET_ABORTED class-attribute instance-attribute
DIRECT_TCP_SOCKET_ABORTED = 'Network.directTCPSocketAborted'

Fired when direct_socket.TCPSocket is aborted.

PARAMETER DESCRIPTION
identifier

Request identifier.

TYPE: RequestId

errorMessage

Error message.

TYPE: str

timestamp

Timestamp.

TYPE: MonotonicTime

DIRECT_TCP_SOCKET_CHUNK_RECEIVED class-attribute instance-attribute
DIRECT_TCP_SOCKET_CHUNK_RECEIVED = 'Network.directTCPSocketChunkReceived'

Fired when data is received from tcp direct socket stream.

PARAMETER DESCRIPTION
identifier

Request identifier.

TYPE: RequestId

data

Data received.

TYPE: str

timestamp

Timestamp.

TYPE: MonotonicTime

DIRECT_TCP_SOCKET_CHUNK_SENT class-attribute instance-attribute
DIRECT_TCP_SOCKET_CHUNK_SENT = 'Network.directTCPSocketChunkSent'

Fired when data is sent to tcp direct socket stream.

PARAMETER DESCRIPTION
identifier

Request identifier.

TYPE: RequestId

data

Data sent.

TYPE: str

timestamp

Timestamp.

TYPE: MonotonicTime

DIRECT_TCP_SOCKET_CLOSED class-attribute instance-attribute
DIRECT_TCP_SOCKET_CLOSED = 'Network.directTCPSocketClosed'

Fired when direct_socket.TCPSocket is closed.

PARAMETER DESCRIPTION
identifier

Request identifier.

TYPE: RequestId

timestamp

Timestamp.

TYPE: MonotonicTime

DIRECT_TCP_SOCKET_CREATED class-attribute instance-attribute
DIRECT_TCP_SOCKET_CREATED = 'Network.directTCPSocketCreated'

Fired upon direct_socket.TCPSocket creation.

PARAMETER DESCRIPTION
identifier

Request identifier.

TYPE: RequestId

remoteAddr

Remote address.

TYPE: str

remotePort

Remote port. Unsigned int 16.

TYPE: int

options

Socket options.

TYPE: DirectTCPSocketOptions

timestamp

Timestamp.

TYPE: MonotonicTime

initiator

Request initiator.

TYPE: Initiator

DIRECT_TCP_SOCKET_OPENED class-attribute instance-attribute
DIRECT_TCP_SOCKET_OPENED = 'Network.directTCPSocketOpened'

Fired when direct_socket.TCPSocket connection is opened.

PARAMETER DESCRIPTION
identifier

Request identifier.

TYPE: RequestId

remoteAddr

Remote address.

TYPE: str

remotePort

Remote port. Expected to be unsigned integer.

TYPE: int

timestamp

Timestamp.

TYPE: MonotonicTime

localAddr

Local address.

TYPE: str

localPort

Local port. Expected to be unsigned integer.

TYPE: int

DIRECT_UDP_SOCKET_ABORTED class-attribute instance-attribute
DIRECT_UDP_SOCKET_ABORTED = 'Network.directUDPSocketAborted'

Fired when direct_socket.UDPSocket is aborted.

PARAMETER DESCRIPTION
identifier

Request identifier.

TYPE: RequestId

errorMessage

Error message.

TYPE: str

timestamp

Timestamp.

TYPE: MonotonicTime

DIRECT_UDP_SOCKET_CHUNK_RECEIVED class-attribute instance-attribute
DIRECT_UDP_SOCKET_CHUNK_RECEIVED = 'Network.directUDPSocketChunkReceived'

Fired when message is received from udp direct socket stream.

PARAMETER DESCRIPTION
identifier

Request identifier.

TYPE: RequestId

message

Message data.

TYPE: DirectUDPMessage

timestamp

Timestamp.

TYPE: MonotonicTime

DIRECT_UDP_SOCKET_CHUNK_SENT class-attribute instance-attribute
DIRECT_UDP_SOCKET_CHUNK_SENT = 'Network.directUDPSocketChunkSent'

Fired when message is sent to udp direct socket stream.

PARAMETER DESCRIPTION
identifier

Request identifier.

TYPE: RequestId

message

Message data.

TYPE: DirectUDPMessage

timestamp

Timestamp.

TYPE: MonotonicTime

DIRECT_UDP_SOCKET_CLOSED class-attribute instance-attribute
DIRECT_UDP_SOCKET_CLOSED = 'Network.directUDPSocketClosed'

Fired when direct_socket.UDPSocket is closed.

PARAMETER DESCRIPTION
identifier

Request identifier.

TYPE: RequestId

timestamp

Timestamp.

TYPE: MonotonicTime

DIRECT_UDP_SOCKET_CREATED class-attribute instance-attribute
DIRECT_UDP_SOCKET_CREATED = 'Network.directUDPSocketCreated'

Fired upon direct_socket.UDPSocket creation.

PARAMETER DESCRIPTION
identifier

Request identifier.

TYPE: RequestId

options

Socket options.

TYPE: DirectUDPSocketOptions

timestamp

Timestamp.

TYPE: MonotonicTime

initiator

Request initiator.

TYPE: Initiator

DIRECT_UDP_SOCKET_OPENED class-attribute instance-attribute
DIRECT_UDP_SOCKET_OPENED = 'Network.directUDPSocketOpened'

Fired when direct_socket.UDPSocket connection is opened.

PARAMETER DESCRIPTION
identifier

Request identifier.

TYPE: RequestId

localAddr

Local address.

TYPE: str

localPort

Local port. Expected to be unsigned integer.

TYPE: int

timestamp

Timestamp.

TYPE: MonotonicTime

remoteAddr

Remote address.

TYPE: str

remotePort

Remote port. Expected to be unsigned integer.

TYPE: int

POLICY_UPDATED class-attribute instance-attribute
POLICY_UPDATED = 'Network.policyUpdated'

Fired once security policy has been updated.

REPORTING_API_ENDPOINTS_CHANGED_FOR_ORIGIN class-attribute instance-attribute
REPORTING_API_ENDPOINTS_CHANGED_FOR_ORIGIN = 'Network.reportingApiEndpointsChangedForOrigin'

Fired when Reporting API endpoints change for an origin.

PARAMETER DESCRIPTION
origin

Origin of the document(s) which configured the endpoints.

TYPE: str

endpoints

The endpoints configured for the origin.

TYPE: array[ReportingApiEndpoint]

REPORTING_API_REPORT_ADDED class-attribute instance-attribute
REPORTING_API_REPORT_ADDED = 'Network.reportingApiReportAdded'

Is sent whenever a new report is added. And after 'enableReportingApi' for all existing reports.

PARAMETER DESCRIPTION
report

The report that was added.

TYPE: ReportingApiReport

REPORTING_API_REPORT_UPDATED class-attribute instance-attribute
REPORTING_API_REPORT_UPDATED = 'Network.reportingApiReportUpdated'

Fired when a report is updated.

PARAMETER DESCRIPTION
report

The report that was updated.

TYPE: ReportingApiReport

REQUEST_WILL_BE_SENT_EXTRA_INFO class-attribute instance-attribute
REQUEST_WILL_BE_SENT_EXTRA_INFO = 'Network.requestWillBeSentExtraInfo'

Fired when additional information about a requestWillBeSent event is available from the network stack. Not every requestWillBeSent event will have an additional requestWillBeSentExtraInfo fired for it, and there is no guarantee whether requestWillBeSent or requestWillBeSentExtraInfo will be fired first for the same request.

PARAMETER DESCRIPTION
requestId

Request identifier. Used to match this information to an existing requestWillBeSent event.

TYPE: RequestId

associatedCookies

A list of cookies potentially associated to the requested URL. This includes both cookies sent with the request and the ones not sent; the latter are distinguished by having blockedReasons field set.

TYPE: array[AssociatedCookie]

headers

Raw request headers as they will be sent over the wire.

TYPE: Headers

connectTiming

Connection timing information for the request.

TYPE: ConnectTiming

clientSecurityState

The client security state set for the request.

TYPE: ClientSecurityState

siteHasCookieInOtherPartition

Whether the site has partitioned cookies stored in a partition different than the current one.

TYPE: bool

RESOURCE_CHANGED_PRIORITY class-attribute instance-attribute
RESOURCE_CHANGED_PRIORITY = 'Network.resourceChangedPriority'

Fired when resource loading priority is changed.

PARAMETER DESCRIPTION
requestId

Request identifier.

TYPE: RequestId

newPriority

New priority.

TYPE: ResourcePriority

timestamp

Timestamp.

TYPE: MonotonicTime

RESPONSE_RECEIVED_EARLY_HINTS class-attribute instance-attribute
RESPONSE_RECEIVED_EARLY_HINTS = 'Network.responseReceivedEarlyHints'

Fired when 103 Early Hints headers is received in addition to the common response. Not every responseReceived event will have an responseReceivedEarlyHints fired. Only one responseReceivedEarlyHints may be fired for eached responseReceived event.

PARAMETER DESCRIPTION
requestId

Request identifier. Used to match this information to another responseReceived event.

TYPE: RequestId

headers

Raw response headers as they were received over the wire. Duplicate headers in the response are represented as a single key with their values concatentated using \n as the separator. See also headersText that contains verbatim text for HTTP/1.*.

TYPE: Headers

RESPONSE_RECEIVED_EXTRA_INFO class-attribute instance-attribute
RESPONSE_RECEIVED_EXTRA_INFO = 'Network.responseReceivedExtraInfo'

Fired when additional information about a responseReceived event is available from the network stack. Not every responseReceived event will have an additional responseReceivedExtraInfo for it, and responseReceivedExtraInfo may be fired before or after responseReceived.

PARAMETER DESCRIPTION
requestId

Request identifier. Used to match this information to another responseReceived event.

TYPE: RequestId

blockedCookies

A list of cookies which were not stored from the response along with the corresponding reasons for blocking. The cookies here may not be valid due to syntax errors, which are represented by the invalid cookie line string instead of a proper cookie.

TYPE: array[BlockedSetCookieWithReason]

headers

Raw response headers as they were received over the wire. Duplicate headers in the response are represented as a single key with their values concatentated using \n as the separator. See also headersText that contains verbatim text for HTTP/1.*.

TYPE: Headers

resourceIPAddressSpace

The IP address space of the resource. The address space can only be determined once the transport established the connection, so we can't send it in requestWillBeSentExtraInfo.

TYPE: IPAddressSpace

statusCode

The status code of the response. This is useful in cases the request failed and no responseReceived event is triggered, which is the case for, e.g., CORS errors. This is also the correct status code for cached requests, where the status in responseReceived is a 200 and this will be 304.

TYPE: int

headersText

Raw response header text as it was received over the wire. The raw text may not always be available, such as in the case of HTTP/2 or QUIC.

TYPE: str

cookiePartitionKey

The cookie partition key that will be used to store partitioned cookies set in this response. Only sent when partitioned cookies are enabled.

TYPE: CookiePartitionKey

cookiePartitionKeyOpaque

True if partitioned cookies are enabled, but the partition key is not serializable to string.

TYPE: bool

exemptedCookies

A list of cookies which should have been blocked by 3PCD but are exempted and stored from the response with the corresponding reason.

TYPE: array[ExemptedSetCookieWithReason]

SIGNED_EXCHANGE_RECEIVED class-attribute instance-attribute
SIGNED_EXCHANGE_RECEIVED = 'Network.signedExchangeReceived'

Fired when a signed exchange was received over the network.

PARAMETER DESCRIPTION
requestId

Request identifier.

TYPE: RequestId

info

Information about the signed exchange response.

TYPE: SignedExchangeInfo

SUBRESOURCE_WEB_BUNDLE_INNER_RESPONSE_ERROR class-attribute instance-attribute
SUBRESOURCE_WEB_BUNDLE_INNER_RESPONSE_ERROR = 'Network.subresourceWebBundleInnerResponseError'

Fired when request for resources within a .wbn file failed.

PARAMETER DESCRIPTION
innerRequestId

Request identifier of the subresource request.

TYPE: RequestId

innerRequestURL

URL of the subresource resource.

TYPE: str

errorMessage

Error message.

TYPE: str

bundleRequestId

Bundle request identifier. Used to match this information to another event. This made be absent in case when the instrumentation was enabled only after webbundle was parsed.

TYPE: RequestId

SUBRESOURCE_WEB_BUNDLE_INNER_RESPONSE_PARSED class-attribute instance-attribute
SUBRESOURCE_WEB_BUNDLE_INNER_RESPONSE_PARSED = 'Network.subresourceWebBundleInnerResponseParsed'

Fired when handling requests for resources within a .wbn file. Note: this will only be fired for resources that are requested by the webpage.

PARAMETER DESCRIPTION
innerRequestId

Request identifier of the subresource request.

TYPE: RequestId

innerRequestURL

URL of the subresource resource.

TYPE: str

bundleRequestId

Bundle request identifier. Used to match this information to another event. This made be absent in case when the instrumentation was enabled only after webbundle was parsed.

TYPE: RequestId

SUBRESOURCE_WEB_BUNDLE_METADATA_ERROR class-attribute instance-attribute
SUBRESOURCE_WEB_BUNDLE_METADATA_ERROR = 'Network.subresourceWebBundleMetadataError'

Fired once when parsing the .wbn file has failed.

PARAMETER DESCRIPTION
requestId

Request identifier. Used to match this information to another event.

TYPE: RequestId

errorMessage

Error message.

TYPE: str

SUBRESOURCE_WEB_BUNDLE_METADATA_RECEIVED class-attribute instance-attribute
SUBRESOURCE_WEB_BUNDLE_METADATA_RECEIVED = 'Network.subresourceWebBundleMetadataReceived'

Fired once when parsing the .wbn file has succeeded. The event contains the information about the web bundle contents.

PARAMETER DESCRIPTION
requestId

Request identifier. Used to match this information to another event.

TYPE: RequestId

urls

A list of URLs of resources in the subresource Web Bundle.

TYPE: array[str]

TRUST_TOKEN_OPERATION_DONE class-attribute instance-attribute
TRUST_TOKEN_OPERATION_DONE = 'Network.trustTokenOperationDone'

Fired exactly once for each Trust Token operation. Depending on the type of the operation and whether the operation succeeded or failed, the event is fired before the corresponding request was sent or after the response was received.

PARAMETER DESCRIPTION
status

Detailed success or error status of the operation. Allowed Values: Ok, InvalidArgument, MissingIssuerKeys, FailedPrecondition, ResourceExhausted, AlreadyExists, ResourceLimited, Unauthorized, BadResponse, InternalError, UnknownError, FulfilledLocally, SiteIssuerLimit

TYPE: str

type

Type of Trust Token operation.

TYPE: TrustTokenOperationType

requestId

Request identifier.

TYPE: RequestId

topLevelOrigin

Top level origin. The context in which the operation was attempted.

TYPE: str

issuerOrigin

Origin of the issuer in case of a "Issuance" or "Redemption" operation.

TYPE: str

issuedTokenCount

The number of obtained Trust Tokens on a successful "Issuance" operation.

TYPE: int

DOM Events

pydoll.protocol.dom.events

DomEvent

Bases: str, Enum

Events from the DOM domain of the Chrome DevTools Protocol.

This enumeration contains the names of DOM-related events that can be received from the Chrome DevTools Protocol. These events provide information about changes to the DOM structure, attributes, and other DOM-related activities.

ATTRIBUTE_MODIFIED class-attribute instance-attribute
ATTRIBUTE_MODIFIED = 'DOM.attributeModified'

Fired when Element's attribute is modified.

PARAMETER DESCRIPTION
nodeId

Id of the node that has changed.

TYPE: NodeId

name

Attribute name.

TYPE: str

value

Attribute value.

TYPE: str

ATTRIBUTE_REMOVED class-attribute instance-attribute
ATTRIBUTE_REMOVED = 'DOM.attributeRemoved'

Fired when Element's attribute is removed.

PARAMETER DESCRIPTION
nodeId

Id of the node that has changed.

TYPE: NodeId

name

Attribute name.

TYPE: str

CHARACTER_DATA_MODIFIED class-attribute instance-attribute
CHARACTER_DATA_MODIFIED = 'DOM.characterDataModified'

Mirrors DOMCharacterDataModified event.

PARAMETER DESCRIPTION
nodeId

Id of the node that has changed.

TYPE: NodeId

characterData

New text value.

TYPE: str

CHILD_NODE_COUNT_UPDATED class-attribute instance-attribute
CHILD_NODE_COUNT_UPDATED = 'DOM.childNodeCountUpdated'

Fired when Container's child node count has changed.

PARAMETER DESCRIPTION
nodeId

Id of the node that has changed.

TYPE: NodeId

childNodeCount

New node count.

TYPE: int

CHILD_NODE_INSERTED class-attribute instance-attribute
CHILD_NODE_INSERTED = 'DOM.childNodeInserted'

Mirrors DOMNodeInserted event.

PARAMETER DESCRIPTION
parentNodeId

Id of the node that has changed.

TYPE: NodeId

previousNodeId

Id of the previous sibling.

TYPE: NodeId

node

Inserted node data.

TYPE: Node

CHILD_NODE_REMOVED class-attribute instance-attribute
CHILD_NODE_REMOVED = 'DOM.childNodeRemoved'

Mirrors DOMNodeRemoved event.

PARAMETER DESCRIPTION
parentNodeId

Parent id.

TYPE: NodeId

nodeId

Id of the node that has been removed.

TYPE: NodeId

DOCUMENT_UPDATED class-attribute instance-attribute
DOCUMENT_UPDATED = 'DOM.documentUpdated'

Fired when Document has been totally updated. Node ids are no longer valid.

SET_CHILD_NODES class-attribute instance-attribute
SET_CHILD_NODES = 'DOM.setChildNodes'

Fired when backend wants to provide client with the missing DOM structure. This happens upon most of the calls requesting node ids.

PARAMETER DESCRIPTION
parentId

Parent node id to populate with children.

TYPE: NodeId

nodes

Child nodes array.

TYPE: array[Node]

DISTRIBUTED_NODES_UPDATED class-attribute instance-attribute
DISTRIBUTED_NODES_UPDATED = 'DOM.distributedNodesUpdated'

Called when distribution is changed.

PARAMETER DESCRIPTION
insertionPointId

Insertion point where distributed nodes were updated.

TYPE: NodeId

distributedNodes

Distributed nodes for given insertion point.

TYPE: array[BackendNode]

INLINE_STYLE_INVALIDATED class-attribute instance-attribute
INLINE_STYLE_INVALIDATED = 'DOM.inlineStyleInvalidated'

Fired when Element's inline style is modified via a CSS property modification.

PARAMETER DESCRIPTION
nodeIds

Ids of the nodes for which the inline styles have been invalidated.

TYPE: array[NodeId]

PSEUDO_ELEMENT_ADDED class-attribute instance-attribute
PSEUDO_ELEMENT_ADDED = 'DOM.pseudoElementAdded'

Called when a pseudo element is added to an element.

PARAMETER DESCRIPTION
parentId

Pseudo element's parent element id.

TYPE: NodeId

pseudoElement

The added pseudo element.

TYPE: Node

PSEUDO_ELEMENT_REMOVED class-attribute instance-attribute
PSEUDO_ELEMENT_REMOVED = 'DOM.pseudoElementRemoved'

Called when a pseudo element is removed from an element.

PARAMETER DESCRIPTION
parentId

Pseudo element's parent element id.

TYPE: NodeId

pseudoElementId

The removed pseudo element id.

TYPE: NodeId

SCROLLABLE_FLAG_UPDATED class-attribute instance-attribute
SCROLLABLE_FLAG_UPDATED = 'DOM.scrollableFlagUpdated'

Fired when a node's scrollability state changes.

PARAMETER DESCRIPTION
nodeId

The id of the node.

TYPE: NodeId

isScrollable

If the node is scrollable.

TYPE: bool

SHADOW_ROOT_POPPED class-attribute instance-attribute
SHADOW_ROOT_POPPED = 'DOM.shadowRootPopped'

Called when shadow root is popped from the element.

PARAMETER DESCRIPTION
hostId

Host element id.

TYPE: NodeId

rootId

Shadow root id.

TYPE: NodeId

SHADOW_ROOT_PUSHED class-attribute instance-attribute
SHADOW_ROOT_PUSHED = 'DOM.shadowRootPushed'

Called when shadow root is pushed into the element.

PARAMETER DESCRIPTION
hostId

Host element id.

TYPE: NodeId

root

Shadow root.

TYPE: Node

TOP_LAYER_ELEMENTS_UPDATED class-attribute instance-attribute
TOP_LAYER_ELEMENTS_UPDATED = 'DOM.topLayerElementsUpdated'

Called when top layer elements are changed.

Runtime Events

pydoll.protocol.runtime.events

RuntimeEvent

Bases: str, Enum

Events from the Runtime domain of the Chrome DevTools Protocol.

This enumeration contains the names of Runtime-related events that can be received from the Chrome DevTools Protocol. These events provide information about JavaScript execution, console API calls, exceptions, and execution contexts.

CONSOLE_API_CALLED class-attribute instance-attribute
CONSOLE_API_CALLED = 'Runtime.consoleAPICalled'

Issued when console API was called.

PARAMETER DESCRIPTION
type

Type of the call. Allowed Values: log, debug, info, error, warning, dir, dirxml, table, trace, clear, startGroup, startGroupCollapsed, endGroup, assert, profile, profileEnd, count, timeEnd

TYPE: str

args

Call arguments.

TYPE: array[RemoteObject]

executionContextId

Identifier of the context where the call was made.

TYPE: ExecutionContextId

timestamp

Call timestamp.

TYPE: Timestamp

stackTrace

Stack trace captured when the call was made. The async stack chain is automatically reported for the following call types: assert, error, trace, warning. For other types the async call chain can be retrieved using Debugger.getStackTrace and stackTrace.parentId field.

TYPE: StackTrace

context

Console context descriptor for calls on non-default console context (not console.*): 'anonymous#unique-logger-id' for call on unnamed context, 'name#unique-logger-id' for call on named context.

TYPE: str

EXCEPTION_REVOKED class-attribute instance-attribute
EXCEPTION_REVOKED = 'Runtime.exceptionRevoked'

Issued when unhandled exception was revoked.

PARAMETER DESCRIPTION
reason

Reason describing why exception was revoked.

TYPE: str

exceptionId

The id of revoked exception, as reported in exceptionThrown.

TYPE: int

EXCEPTION_THROWN class-attribute instance-attribute
EXCEPTION_THROWN = 'Runtime.exceptionThrown'

Issued when exception was thrown and unhandled.

PARAMETER DESCRIPTION
timestamp

Timestamp of the exception.

TYPE: Timestamp

exceptionDetails

Details about the exception.

TYPE: ExceptionDetails

EXECUTION_CONTEXT_CREATED class-attribute instance-attribute
EXECUTION_CONTEXT_CREATED = 'Runtime.executionContextCreated'

Issued when new execution context is created.

PARAMETER DESCRIPTION
context

A newly created execution context.

TYPE: ExecutionContextDescription

EXECUTION_CONTEXT_DESTROYED class-attribute instance-attribute
EXECUTION_CONTEXT_DESTROYED = 'Runtime.executionContextDestroyed'

Issued when execution context is destroyed.

PARAMETER DESCRIPTION
executionContextId

Id of the destroyed context.

TYPE: ExecutionContextId

executionContextUniqueId

Unique Id of the destroyed context.

TYPE: str

EXECUTION_CONTEXTS_CLEARED class-attribute instance-attribute
EXECUTION_CONTEXTS_CLEARED = 'Runtime.executionContextsCleared'

Issued when all executionContexts were cleared in browser.

INSPECT_REQUESTED class-attribute instance-attribute
INSPECT_REQUESTED = 'Runtime.inspectRequested'

Issued when object should be inspected (for example, as a result of inspect() command line API call).

PARAMETER DESCRIPTION
object

Object to inspect.

TYPE: RemoteObject

hints

Hints.

TYPE: object

executionContextId

Identifier of the context where the call was made.

TYPE: ExecutionContextId

BINDING_CALLED class-attribute instance-attribute
BINDING_CALLED = 'Runtime.bindingCalled'

Notification is issued every time when binding is called.

PARAMETER DESCRIPTION
name

Name of the binding.

TYPE: str

payload

Payload of the binding.

TYPE: str

executionContextId

Identifier of the context where the call was made.

TYPE: ExecutionContextId

Fetch Events

pydoll.protocol.fetch.events

FetchEvent

Bases: str, Enum

Events from the Fetch domain of the Chrome DevTools Protocol.

This enumeration contains the names of Fetch-related events that can be received from the Chrome DevTools Protocol. These events provide information about network requests that can be intercepted, modified, or responded to by the client.

AUTH_REQUIRED class-attribute instance-attribute
AUTH_REQUIRED = 'Fetch.authRequired'

Issued when the domain is enabled with handleAuthRequests set to true. The request is paused until client responds with continueWithAuth.

PARAMETER DESCRIPTION
requestId

Each request the page makes will have a unique id.

TYPE: RequestId

request

The details of the request.

TYPE: Request

frameId

The id of the frame that initiated the request.

TYPE: FrameId

resourceType

How the requested resource will be used.

TYPE: ResourceType

authChallenge

Details of the Authorization Challenge encountered. If this is set, client should respond with continueRequest that contains AuthChallengeResponse.

TYPE: AuthChallenge

REQUEST_PAUSED class-attribute instance-attribute
REQUEST_PAUSED = 'Fetch.requestPaused'

Issued when the domain is enabled and the request URL matches the specified filter.

The request is paused until the client responds with one of continueRequest, failRequest or fulfillRequest. The stage of the request can be determined by presence of responseErrorReason and responseStatusCode -- the request is at the response stage if either of these fields is present and in the request stage otherwise.

Redirect responses and subsequent requests are reported similarly to regular responses and requests. Redirect responses may be distinguished by the value of responseStatusCode (which is one of 301, 302, 303, 307, 308) along with presence of the location header. Requests resulting from a redirect will have redirectedRequestId field set.

PARAMETER DESCRIPTION
requestId

Each request the page makes will have a unique id.

TYPE: RequestId

request

The details of the request.

TYPE: Request

frameId

The id of the frame that initiated the request.

TYPE: FrameId

resourceType

How the requested resource will be used.

TYPE: ResourceType

responseErrorReason

Response error if intercepted at response stage.

TYPE: ErrorReason

responseStatusCode

Response code if intercepted at response stage.

TYPE: int

responseStatusText

Response status text if intercepted at response stage.

TYPE: str

responseHeaders

Response headers if intercepted at the response stage.

TYPE: array[HeaderEntry]

networkId

If the intercepted request had a corresponding Network.requestWillBeSent event fired for it, then this networkId will be the same as the requestId present in the requestWillBeSent event.

TYPE: RequestId

redirectedRequestId

If the request is due to a redirect response from the server, the id of the request that has caused the redirect.

TYPE: RequestId

Browser Events

pydoll.protocol.browser.events

BrowserEvent

Bases: str, Enum

Events from the Browser domain of the Chrome DevTools Protocol.

This enumeration contains the names of browser-related events that can be received from the Chrome DevTools Protocol. These events provide information about browser activities and state changes.

DOWNLOAD_PROGRESS class-attribute instance-attribute
DOWNLOAD_PROGRESS = 'Browser.downloadProgress'

Fired when download makes progress. The last call has |done| == true.

PARAMETER DESCRIPTION
guid

Global unique identifier of the download.

TYPE: str

totalBytes

Total expected bytes to download.

TYPE: int

receivedBytes

Total bytes received.

TYPE: int

state

Download status. Allowed values: 'inProgress', 'completed', 'canceled'

TYPE: str

DOWNLOAD_WILL_BEGIN class-attribute instance-attribute
DOWNLOAD_WILL_BEGIN = 'Browser.downloadWillBegin'

Fired when page is about to start a download.

PARAMETER DESCRIPTION
frameId

Id of the frame that caused the download to begin.

TYPE: str

guid

Global unique identifier of the download.

TYPE: str

url

URL of the resource being downloaded.

TYPE: str

suggestedFilename

Suggested file name of the resource (the actual name of the file saved on disk may differ).

TYPE: str

Target Events

pydoll.protocol.target.events

TargetEvent

Bases: str, Enum

Events from the Target domain of the Chrome DevTools Protocol.

This enumeration contains the names of Target-related events that can be received from the Chrome DevTools Protocol. These events provide information about target creation, destruction, and communication between targets.

RECEIVED_MESSAGE_FROM_TARGET class-attribute instance-attribute
RECEIVED_MESSAGE_FROM_TARGET = 'Target.receivedMessageFromTarget'

Notifies about a new protocol message received from the session (as reported in attachedToTarget event).

PARAMETER DESCRIPTION
sessionId

Identifier of a session which sends a message.

TYPE: SessionID

message

The message content.

TYPE: str

targetId

Deprecated.

TYPE: TargetID

TARGET_CRASHED class-attribute instance-attribute
TARGET_CRASHED = 'Target.targetCrashed'

Issued when a target has crashed.

PARAMETER DESCRIPTION
targetId

Identifier of the crashed target.

TYPE: TargetID

status

Termination status type.

TYPE: str

errorCode

Termination error code.

TYPE: int

TARGET_CREATED class-attribute instance-attribute
TARGET_CREATED = 'Target.targetCreated'

Issued when a possible inspection target is created.

PARAMETER DESCRIPTION
targetInfo

Information about the created target.

TYPE: TargetInfo

TARGET_DESTROYED class-attribute instance-attribute
TARGET_DESTROYED = 'Target.targetDestroyed'

Issued when a target is destroyed.

PARAMETER DESCRIPTION
targetId

Identifier of the destroyed target.

TYPE: TargetID

TARGET_INFO_CHANGED class-attribute instance-attribute
TARGET_INFO_CHANGED = 'Target.targetInfoChanged'

Issued when some information about a target has changed. This only happens between targetCreated and targetDestroyed.

PARAMETER DESCRIPTION
targetInfo

Updated information about the target.

TYPE: TargetInfo

ATTACHED_TO_TARGET class-attribute instance-attribute
ATTACHED_TO_TARGET = 'Target.attachedToTarget'

Issued when attached to target because of auto-attach or attachToTarget command.

PARAMETER DESCRIPTION
sessionId

Identifier assigned to the session used to send/receive messages.

TYPE: SessionID

targetInfo

Information about the target.

TYPE: TargetInfo

waitingForDebugger

Whether the target is waiting for debugger to attach.

TYPE: bool

DETACHED_FROM_TARGET class-attribute instance-attribute
DETACHED_FROM_TARGET = 'Target.detachedFromTarget'

Issued when detached from target for any reason (including detachFromTarget command). Can be issued multiple times per target if multiple sessions have been attached to it.

PARAMETER DESCRIPTION
sessionId

Detached session identifier.

TYPE: SessionID

targetId

Deprecated.

TYPE: TargetID

Storage Events

pydoll.protocol.storage.events

StorageEvent

Bases: str, Enum

Events from the Storage domain of the Chrome DevTools Protocol.

This enumeration contains the names of Storage-related events that can be received from the Chrome DevTools Protocol. These events provide information about changes to various browser storage mechanisms including Cache Storage, IndexedDB, Interest Groups, Shared Storage, and Storage Buckets.

CACHE_STORAGE_CONTENT_UPDATED class-attribute instance-attribute
CACHE_STORAGE_CONTENT_UPDATED = 'Storage.cacheStorageContentUpdated'

A cache's contents have been modified.

PARAMETER DESCRIPTION
origin

Origin to update.

TYPE: str

storageKey

Storage key to update.

TYPE: str

bucketId

Storage bucket to update.

TYPE: str

cacheName

Name of cache in origin.

TYPE: str

CACHE_STORAGE_LIST_UPDATED class-attribute instance-attribute
CACHE_STORAGE_LIST_UPDATED = 'Storage.cacheStorageListUpdated'

A cache has been added/deleted.

PARAMETER DESCRIPTION
origin

Origin to update.

TYPE: str

storageKey

Storage key to update.

TYPE: str

bucketId

Storage bucket to update.

TYPE: str

INDEXED_DB_CONTENT_UPDATED class-attribute instance-attribute
INDEXED_DB_CONTENT_UPDATED = 'Storage.indexedDBContentUpdated'

The origin's IndexedDB object store has been modified.

PARAMETER DESCRIPTION
origin

Origin to update.

TYPE: str

storageKey

Storage key to update.

TYPE: str

bucketId

Storage bucket to update.

TYPE: str

databaseName

Database to update.

TYPE: str

objectStoreName

ObjectStore to update.

TYPE: str

INDEXED_DB_LIST_UPDATED class-attribute instance-attribute
INDEXED_DB_LIST_UPDATED = 'Storage.indexedDBListUpdated'

The origin's IndexedDB database list has been modified.

PARAMETER DESCRIPTION
origin

Origin to update.

TYPE: str

storageKey

Storage key to update.

TYPE: str

bucketId

Storage bucket to update.

TYPE: str

INTEREST_GROUP_ACCESSED class-attribute instance-attribute
INTEREST_GROUP_ACCESSED = 'Storage.interestGroupAccessed'

One of the interest groups was accessed. Note that these events are global to all targets sharing an interest group store.

PARAMETER DESCRIPTION
accessTime

Time of the access.

TYPE: TimeSinceEpoch

type

Type of access.

TYPE: InterestGroupAccessType

ownerOrigin

Owner origin.

TYPE: str

name

Name of the interest group.

TYPE: str

componentSellerOrigin

For topLevelBid/topLevelAdditionalBid, and when appropriate, win and additionalBidWin.

TYPE: str

bid

For bid or somethingBid event, if done locally and not on a server.

TYPE: number

bidCurrency

Currency of the bid.

TYPE: str

uniqueAuctionId

For non-global events --- links to interestGroupAuctionEvent.

TYPE: InterestGroupAuctionId

INTEREST_GROUP_AUCTION_EVENT_OCCURRED class-attribute instance-attribute
INTEREST_GROUP_AUCTION_EVENT_OCCURRED = 'Storage.interestGroupAuctionEventOccurred'

An auction involving interest groups is taking place. These events are target-specific.

PARAMETER DESCRIPTION
eventTime

Time of the event.

TYPE: TimeSinceEpoch

type

Type of auction event.

TYPE: InterestGroupAuctionEventType

uniqueAuctionId

Unique identifier for the auction.

TYPE: InterestGroupAuctionId

parentAuctionId

Set for child auctions.

TYPE: InterestGroupAuctionId

auctionConfig

Set for started and configResolved.

TYPE: object

INTEREST_GROUP_AUCTION_NETWORK_REQUEST_CREATED class-attribute instance-attribute
INTEREST_GROUP_AUCTION_NETWORK_REQUEST_CREATED = 'Storage.interestGroupAuctionNetworkRequestCreated'

Specifies which auctions a particular network fetch may be related to, and in what role. Note that it is not ordered with respect to Network.requestWillBeSent (but will happen before loadingFinished loadingFailed).

PARAMETER DESCRIPTION
type

Type of fetch.

TYPE: InterestGroupAuctionFetchType

requestId

Request identifier.

TYPE: RequestId

auctions

This is the set of the auctions using the worklet that issued this request. In the case of trusted signals, it's possible that only some of them actually care about the keys being queried.

TYPE: array[InterestGroupAuctionId]

SHARED_STORAGE_ACCESSED class-attribute instance-attribute
SHARED_STORAGE_ACCESSED = 'Storage.sharedStorageAccessed'

Shared storage was accessed by the associated page. The following parameters are included in all events.

PARAMETER DESCRIPTION
accessTime

Time of the access.

TYPE: TimeSinceEpoch

scope

Enum value indicating the access scope.

TYPE: SharedStorageAccessScope

method

Enum value indicating the Shared Storage API method invoked.

TYPE: SharedStorageAccessMethod

mainFrameId

DevTools Frame Token for the primary frame tree's root.

TYPE: FrameId

ownerOrigin

Serialization of the origin owning the Shared Storage data.

TYPE: str

ownerSite

Serialization of the site owning the Shared Storage data.

TYPE: str

params

The sub-parameters wrapped by params are all optional and their presence/absence depends on type.

TYPE: SharedStorageAccessParams

SHARED_STORAGE_WORKLET_OPERATION_EXECUTION_FINISHED class-attribute instance-attribute
SHARED_STORAGE_WORKLET_OPERATION_EXECUTION_FINISHED = 'Storage.sharedStorageWorkletOperationExecutionFinished'

A shared storage run or selectURL operation finished its execution. The following parameters are included in all events.

PARAMETER DESCRIPTION
finishedTime

Time that the operation finished.

TYPE: TimeSinceEpoch

executionTime

Time, in microseconds, from start of shared storage JS API call until end of operation execution in the worklet.

TYPE: int

method

Enum value indicating the Shared Storage API method invoked.

TYPE: SharedStorageAccessMethod

operationId

ID of the operation call.

TYPE: str

workletTargetId

Hex representation of the DevTools token used as the TargetID for the associated shared storage worklet.

TYPE: TargetID

mainFrameId

DevTools Frame Token for the primary frame tree's root.

TYPE: FrameId

ownerOrigin

Serialization of the origin owning the Shared Storage data.

TYPE: str

STORAGE_BUCKET_CREATED_OR_UPDATED class-attribute instance-attribute
STORAGE_BUCKET_CREATED_OR_UPDATED = 'Storage.storageBucketCreatedOrUpdated'

Fired when a storage bucket is created or updated.

PARAMETER DESCRIPTION
bucketInfo

Information about the storage bucket.

TYPE: StorageBucketInfo

STORAGE_BUCKET_DELETED class-attribute instance-attribute
STORAGE_BUCKET_DELETED = 'Storage.storageBucketDeleted'

Fired when a storage bucket is deleted.

PARAMETER DESCRIPTION
bucketId

ID of the deleted storage bucket.

TYPE: str

ATTRIBUTION_REPORTING_REPORT_SENT class-attribute instance-attribute
ATTRIBUTION_REPORTING_REPORT_SENT = 'Storage.attributionReportingReportSent'

Fired when an attribution report is sent.

PARAMETER DESCRIPTION
url

URL the report was sent to.

TYPE: str

body

Body of the report.

TYPE: object

result

Result of the report sending.

TYPE: AttributionReportingReportResult

netError

If result is sent, populated with net/HTTP status.

TYPE: int

netErrorName

Name of the network error if any.

TYPE: str

httpStatusCode

HTTP status code if available.

TYPE: int

ATTRIBUTION_REPORTING_SOURCE_REGISTERED class-attribute instance-attribute
ATTRIBUTION_REPORTING_SOURCE_REGISTERED = 'Storage.attributionReportingSourceRegistered'

Fired when an attribution source is registered.

PARAMETER DESCRIPTION
registration

Registration details.

TYPE: AttributionReportingSourceRegistration

result

Result of the registration.

TYPE: AttributionReportingSourceRegistrationResult

ATTRIBUTION_REPORTING_TRIGGER_REGISTERED class-attribute instance-attribute
ATTRIBUTION_REPORTING_TRIGGER_REGISTERED = 'Storage.attributionReportingTriggerRegistered'

Fired when an attribution trigger is registered.

PARAMETER DESCRIPTION
registration

Registration details.

TYPE: AttributionReportingTriggerRegistration

eventLevel

Event level result.

TYPE: AttributionReportingEventLevelResult

aggregatable

Aggregatable result.

TYPE: AttributionReportingAggregatableResult

Input Events

pydoll.protocol.input.events

InputEvent

Bases: str, Enum

Events from the Input domain of the Chrome DevTools Protocol.

This enumeration contains the names of Input-related events that can be received from the Chrome DevTools Protocol. These events provide information about user input interactions that can be intercepted or simulated.

DRAG_INTERCEPTED class-attribute instance-attribute
DRAG_INTERCEPTED = 'Input.dragIntercepted'

Emitted only when Input.setInterceptDrags is enabled. Use this data with Input.dispatchDragEvent to restore normal drag and drop behavior.

PARAMETER DESCRIPTION
data

Contains information about the dragged data.

TYPE: DragData