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

Method start_session

py/selenium/webdriver/remote/webdriver.py:388–402  ·  view source on GitHub ↗

Creates a new session with the desired capabilities. Args: capabilities: A capabilities dict to start the session with.

(self, capabilities: dict)

Source from the content-addressed store, hash-verified

386 pass
387
388 def start_session(self, capabilities: dict) -> None:
389 """Creates a new session with the desired capabilities.
390
391 Args:
392 capabilities: A capabilities dict to start the session with.
393 """
394 caps = _create_caps(capabilities)
395 try:
396 response = self.execute(Command.NEW_SESSION, caps)["value"]
397 self.session_id = response.get("sessionId")
398 self.caps = response.get("capabilities")
399 except Exception:
400 if hasattr(self, "service") and self.service is not None:
401 self.service.stop()
402 raise
403
404 def _wrap_value(self, value):
405 if isinstance(value, dict):

Callers 1

__init__Method · 0.95

Calls 4

executeMethod · 0.95
_create_capsFunction · 0.85
getMethod · 0.65
stopMethod · 0.65

Tested by

no test coverage detected