Creates a new session with the desired capabilities. Args: capabilities: A capabilities dict to start the session with.
(self, capabilities: dict)
| 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): |
no test coverage detected