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

Method quit

py/selenium/webdriver/remote/webdriver.py:648–663  ·  view source on GitHub ↗

Quits the driver and closes every associated window.

(self)

Source from the content-addressed store, hash-verified

646 self.execute(Command.CLOSE)
647
648 def quit(self) -> None:
649 """Quits the driver and closes every associated window."""
650 try:
651 # Close the BiDi/CDP websocket before deleting the session so the
652 # close is initiated from our side.
653 if self._websocket_connection is not None:
654 self._websocket_connection.close()
655 self._websocket_connection = None
656 self.execute(Command.QUIT)
657 finally:
658 if self._request is not None:
659 self._request.dispose()
660 self._request = None
661 self.stop_client()
662 executor = cast(RemoteConnection, self.command_executor)
663 executor.close()
664
665 @property
666 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