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

Method stop

py/selenium/webdriver/common/service.py:158–173  ·  view source on GitHub ↗

Stops the service.

(self)

Source from the content-addressed store, hash-verified

156 sleep(1)
157
158 def stop(self) -> None:
159 """Stops the service."""
160 if self.log_output not in {PIPE, subprocess.DEVNULL}:
161 if isinstance(self.log_output, int):
162 os.close(self.log_output)
163 elif self.log_output is not None and self._owns_log_output:
164 self.log_output.close()
165 if self.process is not None:
166 try:
167 if self.process.poll() is None:
168 try:
169 self.send_remote_shutdown_command()
170 except TypeError:
171 pass
172 finally:
173 self._terminate_process()
174
175 def _terminate_process(self) -> None:
176 """Terminate the child process.

Callers 3

startMethod · 0.95
__del__Method · 0.95

Calls 3

_terminate_processMethod · 0.95
closeMethod · 0.65

Tested by 1