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

Method _context

py/selenium/webdriver/remote/script.py:293–296  ·  view source on GitHub ↗
(self, context_id: str | None)

Source from the content-addressed store, hash-verified

291 self._driver = driver
292
293 def _context(self, context_id: str | None) -> str | None:
294 if context_id is None and self._driver is not None:
295 return self._driver.current_window_handle
296 return context_id
297
298 def pin(self, function_declaration: str) -> PinnedScript:
299 """Pin a script so it runs in every new document and can be reused by ``execute()``.

Callers 1

executeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected