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

Method browsing_context

py/selenium/webdriver/remote/webdriver.py:1390–1408  ·  view source on GitHub ↗

Returns a browsing context module object for BiDi browsing context commands. Returns: An object containing access to BiDi browsing context commands. Examples: `context_id = driver.browsing_context.create(type="tab")` `driver.browsing_context.navi

(self)

Source from the content-addressed store, hash-verified

1388
1389 @property
1390 def browsing_context(self) -> BrowsingContext:
1391 """Returns a browsing context module object for BiDi browsing context commands.
1392
1393 Returns:
1394 An object containing access to BiDi browsing context commands.
1395
1396 Examples:
1397 `context_id = driver.browsing_context.create(type="tab")`
1398 `driver.browsing_context.navigate(context=context_id, url="https://www.selenium.dev")`
1399 `driver.browsing_context.capture_screenshot(context=context_id)`
1400 `driver.browsing_context.close(context_id)`
1401 """
1402 if not self._websocket_connection:
1403 self._start_bidi()
1404
1405 if self._browsing_context is None:
1406 self._browsing_context = BrowsingContext(self._websocket_connection)
1407
1408 return self._browsing_context
1409
1410 @property
1411 def storage(self) -> Storage:

Callers

nothing calls this directly

Calls 2

_start_bidiMethod · 0.95
BrowsingContextClass · 0.90

Tested by

no test coverage detected