Browser auto download
What about configuring the browser to automatically download the file, then?
This will get rid of the dialog box completely so we no longer have to write any complicated code to interact with a dialog, or to deal with existing files that have the same name. If the file already exists, it will just append a number to the end of it.
This sounds great. We have removed all of the issues around dialog interaction and file naming; it sounds like we could have a winner.
Unfortunately, we still have some problems. If you download a file that already exists, how do you know what the name of the file you just downloaded is? Do we need to start checking file timestamps to see when it was downloaded?
Selenium is unaware of the download ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access