MCPcopy Create free account
hub / github.com/seleniumbase/SeleniumBase / is_running

Method is_running

seleniumbase/undetected/__init__.py:402–418  ·  view source on GitHub ↗

Check if the browser is still running.

(self)

Source from the content-addressed store, hash-verified

400 )
401
402 def is_running(self):
403 """Check if the browser is still running."""
404 if not getattr(self, "_process_pid", None):
405 return False
406 # Not good enough: return psutil.pid_exists(self._process_pid)
407 try:
408 process = psutil.Process(self._process_pid)
409 # Check for PID recycling: Is this actually our process?
410 if hasattr(self, "_process_create_time"):
411 if process.create_time() != self._process_create_time:
412 return False # The PID was reused by a different process!
413 # If the process is a zombie, assume the browser isn't running
414 return process.status() != psutil.STATUS_ZOMBIE
415 except psutil.NoSuchProcess:
416 return False
417 except Exception:
418 return None
419
420 def remove_cdc_props_as_needed(self):
421 cdc_props = self._get_cdc_props()

Callers 1

_patch_loopFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected