You can also go to the browser's menu and select Print. Method 5 Saving a Webpage as a PDF in a Web Browser 1 Press Cmd + P (Mac) or Ctrl + P (Windows). The document will be saved as a PDF file in the location you specified. from selenium import webdriverįrom import Selectįrom import Byįrom import WebDriverWaitįrom import expected_conditions as ECįrom import NoSuchElementExceptionįrom import TimeoutExceptionįrom import Optionsįrom mon. It's the lower-right corner of the dialog box. Scroll down and click on 'Export to.' This will bring up the export dropdown menu. Based on the code here - Ĭoding on a Mac with Mojave 10.14.5. Open the Pages document you want to convert. ![]() ![]() ![]() However, while the print pop-up shows up, after a second or two it goes away, with no PDF saved. 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.
0 Comments
Leave a Reply. |