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

Method webextension

py/selenium/webdriver/remote/webdriver.py:1460–1482  ·  view source on GitHub ↗

Get a webextension module object for BiDi webextension commands. .. deprecated:: Use ``driver.install_web_extension()`` and ``driver.uninstall_web_extension()`` instead. Returns: An object containing access to BiDi webextension commands.

(self)

Source from the content-addressed store, hash-verified

1458
1459 @property
1460 def webextension(self) -> BidiWebExtension:
1461 """Get a webextension module object for BiDi webextension commands.
1462
1463 .. deprecated::
1464 Use ``driver.install_web_extension()`` and
1465 ``driver.uninstall_web_extension()`` instead.
1466
1467 Returns:
1468 An object containing access to BiDi webextension commands.
1469 """
1470 warnings.warn(
1471 "driver.webextension is deprecated, use driver.install_web_extension() "
1472 "and driver.uninstall_web_extension() instead",
1473 DeprecationWarning,
1474 stacklevel=2,
1475 )
1476 if not self._websocket_connection:
1477 self._start_bidi()
1478
1479 if self._webextension is None:
1480 self._webextension = BidiWebExtension(self._websocket_connection)
1481
1482 return self._webextension
1483
1484 def install_web_extension(
1485 self,

Callers

nothing calls this directly

Calls 2

_start_bidiMethod · 0.95
warnMethod · 0.45

Tested by

no test coverage detected