how to save opened page as pdf in Selenium (Python)
问题 Have tried all the solutions I could find on the Internet to be able to print a page that is open in Selenium in Python. However, while the print pop-up shows up, after a second or two it goes away, with no PDF saved. Here is the code being tried. Based on the code here - https://stackoverflow.com/a/43752129/3973491 Coding on a Mac with Mojave 10.14.5. from selenium import webdriver from selenium.webdriver.support.select import Select from selenium.webdriver.common.by import By from selenium