I want to get the last downloaded file name to read it from java. I am working with selenium and need to get the last downloaded file name from chrome download list or from my download directory.
how to get last downloaded file name from chrome download list [i.e. chrome://downloads] using java?
Asked
Active
Viewed 1,734 times
1
-
Do you need to extract the file name necessarily from the webbrowser? Since the test-'browser' launched by selenium is not a replica of your actual webbrowser and therefore will not contain the download list, this will be hard. If it works for you to get the filename from the users download directory, this would be far easier. – wittn Jul 20 '19 at 23:49
-
Check my answer [here](https://stackoverflow.com/questions/34548041/selenium-give-file-name-when-downloading/56570364#56570364) – supputuri Jul 21 '19 at 02:28
-
Possible duplicate of [Selenium give file name when downloading](https://stackoverflow.com/questions/34548041/selenium-give-file-name-when-downloading) – supputuri Jul 21 '19 at 02:30