I want to open a PDF URL, print it, and close the window. I've tried doing this through Selenium, but the page is behind a login auth, which is retained in normal Chrome, but seems impossible to get past when using chromedriver. My Python script can open the page via os.system(f"open '/Applications/Google Chrome.app' -u '{url}'"), so all I need to do is effectively cmd-P, enter, cmd-W (macOS). Can it be done?