Skip to content

inspector

Detached dataclass

Fired when remote debugging connection is about to be terminated. Contains detach reason.

Source code in zendriver/cdp/inspector.py
@event_class("Inspector.detached")
@dataclass
class Detached:
    """
    Fired when remote debugging connection is about to be terminated. Contains detach reason.
    """

    #: The reason why connection has been terminated.
    reason: str

    @classmethod
    def from_json(cls, json: T_JSON_DICT) -> Detached:
        return cls(reason=str(json["reason"]))

reason: str instance-attribute

__init__(reason)

from_json(json) classmethod

Source code in zendriver/cdp/inspector.py
@classmethod
def from_json(cls, json: T_JSON_DICT) -> Detached:
    return cls(reason=str(json["reason"]))

TargetCrashed dataclass

Fired when debugging target has crashed

Source code in zendriver/cdp/inspector.py
@event_class("Inspector.targetCrashed")
@dataclass
class TargetCrashed:
    """
    Fired when debugging target has crashed
    """

    @classmethod
    def from_json(cls, json: T_JSON_DICT) -> TargetCrashed:
        return cls()

__init__()

from_json(json) classmethod

Source code in zendriver/cdp/inspector.py
@classmethod
def from_json(cls, json: T_JSON_DICT) -> TargetCrashed:
    return cls()

TargetReloadedAfterCrash dataclass

Fired when debugging target has reloaded after crash

Source code in zendriver/cdp/inspector.py
@event_class("Inspector.targetReloadedAfterCrash")
@dataclass
class TargetReloadedAfterCrash:
    """
    Fired when debugging target has reloaded after crash
    """

    @classmethod
    def from_json(cls, json: T_JSON_DICT) -> TargetReloadedAfterCrash:
        return cls()

__init__()

from_json(json) classmethod

Source code in zendriver/cdp/inspector.py
@classmethod
def from_json(cls, json: T_JSON_DICT) -> TargetReloadedAfterCrash:
    return cls()

disable()

Disables inspector domain notifications.

Source code in zendriver/cdp/inspector.py
def disable() -> typing.Generator[T_JSON_DICT, T_JSON_DICT, None]:
    """
    Disables inspector domain notifications.
    """
    cmd_dict: T_JSON_DICT = {
        "method": "Inspector.disable",
    }
    json = yield cmd_dict

enable()

Enables inspector domain notifications.

Source code in zendriver/cdp/inspector.py
def enable() -> typing.Generator[T_JSON_DICT, T_JSON_DICT, None]:
    """
    Enables inspector domain notifications.
    """
    cmd_dict: T_JSON_DICT = {
        "method": "Inspector.enable",
    }
    json = yield cmd_dict