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

Method __getattr__

py/selenium/webdriver/remote/script.py:450–466  ·  view source on GitHub ↗
(self, name: str)

Source from the content-addressed store, hash-verified

448 self._script.clear_dom_mutation_handlers()
449
450 def __getattr__(self, name: str) -> Any:
451 # Only reached for names Script does not define: the protocol commands
452 # (and helpers) driver.script used to expose. Keep them working while deprecated.
453 if name.startswith("__"):
454 raise AttributeError(name)
455 attribute = getattr(self._script, name)
456 replacement = _REPLACEMENTS.get(name)
457 if replacement:
458 advice = f"use {replacement} instead"
459 else:
460 advice = f"there is no supported replacement; see {BIDI_IMPLEMENTATION_DOC_URL}"
461 warnings.warn(
462 f"driver.script.{name} is deprecated and will be removed; {advice}",
463 DeprecationWarning,
464 stacklevel=2,
465 )
466 return attribute

Callers

nothing calls this directly

Calls 2

getMethod · 0.65
warnMethod · 0.45

Tested by

no test coverage detected