1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

[Python] subprocess.Popen wait doesn't seem to wait for Google Chrome on macOS

Discussão em 'Python' iniciado por Stack, Novembro 24, 2025.

  1. Stack

    Stack Membro Participativo

    p = subprocess.Popen([
    "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome",
    f"--remote-debugging-port={SOME_PORT_NUM}",
    "--no-first-run",
    "--no-default-browser-check",
    "--disable-popup-blocking",
    "--start-maximised",
    "--user-data-dir=/tmp/chrome-profile"
    ])

    p.wait()
    print("exited")


    My expectation would be that p.wait() would block until I closed the browser - instead what I see on the terminal is:

    Opening in existing browser session.
    exited


    Is there a way of getting this to match my expectations?

    Continue reading...

Compartilhe esta Página