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

Function get_connection_context

py/private/cdp.py:84–93  ·  view source on GitHub ↗

Look up the current connection. If there is no current connection, raise a ``RuntimeError`` with a helpful message.

(fn_name)

Source from the content-addressed store, hash-verified

82
83
84def get_connection_context(fn_name):
85 """Look up the current connection.
86
87 If there is no current connection, raise a ``RuntimeError`` with a
88 helpful message.
89 """
90 try:
91 return _connection_context.get()
92 except LookupError:
93 raise RuntimeError(f"{fn_name}() must be called in a connection context.") from None
94
95
96def get_session_context(fn_name):

Callers

nothing calls this directly

Calls 1

getMethod · 0.65

Tested by

no test coverage detected