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

Method quit

py/selenium/webdriver/remote/webdriver.py:637–652  ·  view source on GitHub ↗

Quits the driver and closes every associated window.

(self)

Source from the content-addressed store, hash-verified

635 self.execute(Command.CLOSE)
636
637 def quit(self) -> None:
638 """Quits the driver and closes every associated window."""
639 try:
640 # Close the BiDi/CDP websocket before deleting the session so the
641 # close is initiated from our side.
642 if self._websocket_connection is not None:
643 self._websocket_connection.close()
644 self._websocket_connection = None
645 self.execute(Command.QUIT)
646 finally:
647 if self._request is not None:
648 self._request.dispose()
649 self._request = None
650 self.stop_client()
651 executor = cast(RemoteConnection, self.command_executor)
652 executor.close()
653
654 @property
655 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