0

I'm using selenium to automate some pdf files downloads. However, I ran into a problem where I need to click on the save button in the following pop up window.

enter image description here

I couldn't find any method to click on the save button using Selenium. Any suggestions would be greatly appreciated

1
  • did you try to click Enter using Selenium or configure your browser so it would start download without prompt? Commented Oct 14, 2019 at 12:05

1 Answer 1

1

If you use gecko driver

from selenium.webdriver.firefox.firefox_porfile import FirefoxProfile()
profile = FirefoxProfile()
# Save pdf without asking
profile.set_preference("browser.helperApps.neverAsk.saveToDisk", "application/pdf")

You can find other files subtitles

https://www.sitepoint.com/mime-types-complete-list/

edit: I find a similar link here:

In selenium python webdriver, I'm not able to download a text file with a .lst extension

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.