MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / aclose

Method aclose

py/private/cdp.py:411–420  ·  view source on GitHub ↗

Close the underlying WebSocket connection. This will cause the reader task to gracefully exit when it tries to read the next message from the WebSocket. All of the public APIs (``execute()``, ``listen()``, etc.) will raise ``CdpConnectionClosed`` after the CDP connec

(self)

Source from the content-addressed store, hash-verified

409 self.sessions = {}
410
411 async def aclose(self):
412 """Close the underlying WebSocket connection.
413
414 This will cause the reader task to gracefully exit when it tries
415 to read the next message from the WebSocket. All of the public
416 APIs (``execute()``, ``listen()``, etc.) will raise
417 ``CdpConnectionClosed`` after the CDP connection is closed. It
418 is safe to call this multiple times.
419 """
420 await self.ws.aclose()
421
422 @asynccontextmanager
423 async def open_session(self, target_id) -> AsyncIterator[CdpSession]:

Callers 1

open_cdpFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected