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

Method quit

py/selenium/webdriver/remote/webdriver.py:715–730  ·  view source on GitHub ↗

Quits the driver and closes every associated window.

(self)

Source from the content-addressed store, hash-verified

713 self.execute(Command.CLOSE)
714
715 def quit(self) -> None:
716 """Quits the driver and closes every associated window."""
717 try:
718 # Close the BiDi/CDP websocket before deleting the session so the
719 # close is initiated from our side.
720 if self._websocket_connection is not None:
721 self._websocket_connection.close()
722 self._websocket_connection = None
723 self.execute(Command.QUIT)
724 finally:
725 if self._request is not None:
726 self._request.dispose()
727 self._request = None
728 self.stop_client()
729 executor = cast(RemoteConnection, self.command_executor)
730 executor.close()
731
732 @property
733 def current_window_handle(self) -> str:

Callers 5

__init__Method · 0.95
__exit__Method · 0.95
__init__Method · 0.95
__init__Method · 0.95
__init__Method · 0.95

Calls 4

executeMethod · 0.95
stop_clientMethod · 0.95
closeMethod · 0.65
disposeMethod · 0.45

Tested by

no test coverage detected