MCPcopy
hub / github.com/microsoft/playwright-python / close

Method close

playwright/_impl/_browser_context.py:573–586  ·  view source on GitHub ↗
(self, reason: str = None)

Source from the content-addressed store, hash-verified

571 return self._closing_or_closed
572
573 async def close(self, reason: str = None) -> None:
574 if self._closing_or_closed:
575 return
576 self._close_reason = reason
577 self._closing_or_closed = True
578
579 await self.request.dispose(reason=reason)
580
581 async def _inner_close() -> None:
582 await self._tracing._export_all_hars()
583
584 await self._channel._connection.wrap_api_call(_inner_close, True)
585 await self._channel.send("close", None, {"reason": reason})
586 await self._closed_future
587
588 async def storage_state(
589 self, path: Union[str, Path] = None, indexedDB: bool = None

Callers

nothing calls this directly

Calls 3

wrap_api_callMethod · 0.80
disposeMethod · 0.45
sendMethod · 0.45

Tested by

no test coverage detected