I wrote an automation test in selenium java that detects if the page is redirecting (the automation detects if a new page is opened, the page redirects to other page, a new tab is opened and if an alert window is opened)
Now to the problem. one of the redirects i can't find any way to detect is an automatic downloaded file (you enter a website and the website automatically downloads a file without any trigger from the user)
p.s.
I know the download process may differ in each browser, I need it to work mainly on chrome
Thanks
My solution in the end was to count the files in the download directory before and after i open the page.
I'll be glad to know if someone knows a way to find the trigger for the download