目标协议
Chrome DevTools 协议的目标域命令、事件和类型。
方法
pydoll.protocol.target.methods
AttachToBrowserTargetResponse
module-attribute
AttachToBrowserTargetResponse = Response[AttachToBrowserTargetResult]
CreateBrowserContextResponse
module-attribute
CreateBrowserContextResponse = Response[CreateBrowserContextResult]
GetBrowserContextsResponse
module-attribute
GetBrowserContextsResponse = Response[GetBrowserContextsResult]
ActivateTargetCommand
module-attribute
ActivateTargetCommand = Command[ActivateTargetParams, EmptyResponse]
AttachToTargetCommand
module-attribute
AttachToTargetCommand = Command[AttachToTargetParams, AttachToTargetResponse]
AttachToBrowserTargetCommand
module-attribute
AttachToBrowserTargetCommand = Command[EmptyParams, AttachToBrowserTargetResponse]
CloseTargetCommand
module-attribute
CloseTargetCommand = Command[CloseTargetParams, CloseTargetResponse]
ExposeDevToolsProtocolCommand
module-attribute
ExposeDevToolsProtocolCommand = Command[ExposeDevToolsProtocolParams, EmptyResponse]
CreateBrowserContextCommand
module-attribute
CreateBrowserContextCommand = Command[CreateBrowserContextParams, CreateBrowserContextResponse]
GetBrowserContextsCommand
module-attribute
GetBrowserContextsCommand = Command[EmptyParams, GetBrowserContextsResponse]
CreateTargetCommand
module-attribute
CreateTargetCommand = Command[CreateTargetParams, CreateTargetResponse]
DetachFromTargetCommand
module-attribute
DetachFromTargetCommand = Command[DetachFromTargetParams, EmptyResponse]
DisposeBrowserContextCommand
module-attribute
DisposeBrowserContextCommand = Command[DisposeBrowserContextParams, EmptyResponse]
GetTargetInfoCommand
module-attribute
GetTargetInfoCommand = Command[GetTargetInfoParams, GetTargetInfoResponse]
GetTargetsCommand
module-attribute
GetTargetsCommand = Command[GetTargetsParams, GetTargetsResponse]
SendMessageToTargetCommand
module-attribute
SendMessageToTargetCommand = Command[SendMessageToTargetParams, EmptyResponse]
SetAutoAttachCommand
module-attribute
SetAutoAttachCommand = Command[SetAutoAttachParams, EmptyResponse]
AutoAttachRelatedCommand
module-attribute
AutoAttachRelatedCommand = Command[AutoAttachRelatedParams, EmptyResponse]
SetDiscoverTargetsCommand
module-attribute
SetDiscoverTargetsCommand = Command[SetDiscoverTargetsParams, EmptyResponse]
SetRemoteLocationsCommand
module-attribute
SetRemoteLocationsCommand = Command[SetRemoteLocationsParams, EmptyResponse]
OpenDevToolsCommand
module-attribute
OpenDevToolsCommand = Command[OpenDevToolsParams, OpenDevToolsResponse]
TargetMethod
Bases: str
, Enum
Target domain method names.
ATTACH_TO_BROWSER_TARGET
class-attribute
instance-attribute
EXPOSE_DEV_TOOLS_PROTOCOL
class-attribute
instance-attribute
CREATE_BROWSER_CONTEXT
class-attribute
instance-attribute
GET_BROWSER_CONTEXTS
class-attribute
instance-attribute
DETACH_FROM_TARGET
class-attribute
instance-attribute
DISPOSE_BROWSER_CONTEXT
class-attribute
instance-attribute
SEND_MESSAGE_TO_TARGET
class-attribute
instance-attribute
AUTO_ATTACH_RELATED
class-attribute
instance-attribute
SET_DISCOVER_TARGETS
class-attribute
instance-attribute
SET_REMOTE_LOCATIONS
class-attribute
instance-attribute
ActivateTargetParams
AttachToTargetParams
AttachToBrowserTargetParams
CloseTargetParams
ExposeDevToolsProtocolParams
CreateBrowserContextParams
CreateTargetParams
Bases: TypedDict
Parameters for the createTarget command.
DetachFromTargetParams
DisposeBrowserContextParams
GetTargetInfoParams
GetTargetsParams
SendMessageToTargetParams
SetAutoAttachParams
AutoAttachRelatedParams
SetDiscoverTargetsParams
SetRemoteLocationsParams
OpenDevToolsParams
AttachToTargetResult
AttachToBrowserTargetResult
CloseTargetResult
CreateBrowserContextResult
GetBrowserContextsResult
CreateTargetResult
GetTargetInfoResult
GetTargetsResult
事件
pydoll.protocol.target.events
DetachedFromTargetEvent
module-attribute
DetachedFromTargetEvent = CDPEvent[DetachedFromTargetParams]
ReceivedMessageFromTargetEvent
module-attribute
ReceivedMessageFromTargetEvent = CDPEvent[ReceivedMessageFromTargetParams]
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
TARGET_CRASHED
class-attribute
instance-attribute
Issued when a target has crashed.
PARAMETER | DESCRIPTION |
---|---|
targetId
|
Identifier of the crashed target.
TYPE:
|
status
|
Termination status type.
TYPE:
|
errorCode
|
Termination error code.
TYPE:
|
TARGET_CREATED
class-attribute
instance-attribute
Issued when a possible inspection target is created.
PARAMETER | DESCRIPTION |
---|---|
targetInfo
|
Information about the created target.
TYPE:
|
TARGET_DESTROYED
class-attribute
instance-attribute
Issued when a target is destroyed.
PARAMETER | DESCRIPTION |
---|---|
targetId
|
Identifier of the destroyed target.
TYPE:
|
TARGET_INFO_CHANGED
class-attribute
instance-attribute
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:
|
ATTACHED_TO_TARGET
class-attribute
instance-attribute
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:
|
targetInfo
|
Information about the target.
TYPE:
|
waitingForDebugger
|
Whether the target is waiting for debugger to attach.
TYPE:
|
DETACHED_FROM_TARGET
class-attribute
instance-attribute
AttachedToTargetParams
DetachedFromTargetParams
ReceivedMessageFromTargetParams
TargetCreatedParams
TargetDestroyedParams
TargetCrashedParams
类型
pydoll.protocol.target.types
TargetInfo
Bases: TypedDict