Skip to content

Commit

Permalink
Fix UC Mode headless issue on macOS for Chrome 120+
Browse files Browse the repository at this point in the history
  • Loading branch information
mdmintz committed Dec 19, 2023
1 parent 570910c commit ac8d77e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions seleniumbase/undetected/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -446,12 +446,13 @@ def quit(self):
try:
logger.debug("Terminating the UC browser")
os.kill(self.browser_pid, 15)
if IS_POSIX:
if "linux" in sys.platform:
os.waitpid(self.browser_pid, 0)
time.sleep(0.02)
else:
time.sleep(0.05)
time.sleep(0.04)
except (AttributeError, ChildProcessError, RuntimeError, OSError):
pass
time.sleep(0.05)
except TimeoutError as e:
logger.debug(e, exc_info=True)
except Exception:
Expand Down

0 comments on commit ac8d77e

Please sign in to comment.