When I navigate to certain URL, the browser prompts me to open a file:
How can I select "Open" when controlling the browser via selenium? Can I set some options to the webdriver to automatically open files? I am using Microsoft Edge.
My current solution is to use keyboard
module and press tabulator and enter to click the open-button, but I would like to do this so that the keyboard
-module wouldn't be needed and I would be able to run selenium in headless mode.
Also, if there is another way to do this than by using selenium, feel free to suggest. Thank you in advance!
First of all you should understand if it is a browser prompt or a prompt from the website. In the first case, Selenium can't handle it.
If it is a website prompt, you should try
Wrote it C#, but I think is the same thing in Python.