mokr.connection.devtools ======================== .. py:module:: mokr.connection.devtools Attributes ---------- .. autoapisummary:: mokr.connection.devtools.LOGGER Classes ------- .. autoapisummary:: mokr.connection.devtools.DevtoolsConnection Module Contents --------------- .. py:data:: LOGGER .. py:class:: DevtoolsConnection(connection: mokr.connection.connection.Connection | DevtoolsConnection, target_type: str, session_id: str, loop: asyncio.AbstractEventLoop) Bases: :py:obj:`pyee.EventEmitter`, :py:obj:`mokr.connection.base.RemoteConnection` Create new CDP (Chrome Devtools Protocol) session. Most functionality is controlled by calling CDP methods or handling CDP events. Read more about these at: https://chromedevtools.github.io/devtools-protocol/ :param connection: Parent remote connection to use. :type connection: Connection | DevtoolsConnection :param target_type: Type of target this connection is for. :type target_type: str :param session_id: Unique session identifier. :type session_id: str :param loop: Running asyncio loop. :type loop: asyncio.AbstractEventLoop .. py:method:: send(method: str, params: dict = None) -> Awaitable[dict] Send a message to the remote connection. :param method: Method to run. :type method: str :param params: Arguments for method, if any. Defaults to None. :type params: dict, optional :raises NetworkError: Raised if connection is closed. :returns: Remote response as dictionary. :rtype: Awaitable[dict] .. py:method:: detach() -> None :async: Detach session from it's target. Once detached, it is invalid and cannot receive or send messages. :raises NetworkError: Raised if remote connection is already closed.