MCPcopy Index your code
hub / github.com/microsoft/playwright-python / close

Method close

playwright/_impl/_browser.py:235–244  ·  view source on GitHub ↗
(self, reason: str = None)

Source from the content-addressed store, hash-verified

233 return await self._connection.wrap_api_call(inner, title="Create page")
234
235 async def close(self, reason: str = None) -> None:
236 self._close_reason = reason
237 try:
238 if self._should_close_connection_on_close:
239 await self._connection.stop_async()
240 else:
241 await self._channel.send("close", None, {"reason": reason})
242 except Exception as e:
243 if not is_target_closed_error(e):
244 raise e
245
246 @property
247 def version(self) -> str:

Callers

nothing calls this directly

Calls 3

is_target_closed_errorFunction · 0.90
stop_asyncMethod · 0.80
sendMethod · 0.45

Tested by

no test coverage detected