Selenium Webdriver: How to Download a PDF File with Python?

前端 未结 3 1965
离开以前
离开以前 2020-12-03 19:17

I am using selenium webdriver to automate downloading several PDF files. I get the PDF preview window (see below), and now I would like to download the file. How can I accom

3条回答
  •  时光说笑
    2020-12-03 20:07

    In My case it worked without any code modification,Just need to disabled the Chrome pdf viewer

    Here are the steps to disable it

    1. Go into Chrome Settings
    2. Scroll to the bottom click on Advanced
    3. Under Privacy And Security - Click on "Site Settings"
    4. Scroll to PDF Documents
    5. Enable "Download PDF files instead of automatically opening them in Chrome"

提交回复
热议问题