While I download the file (Say "a.png") multiple time in Non-headless mode THEN it makes a copy of that file in the downloaded folder (like "a.png" and "a(1).png").
BUT
While I download the file (Say "a.png") multiple time in Headless mode THEN it does not makes a copy of that file in the downloaded folder , instead update with latest file(checked the datetime) and only one file is present.
Any Idea why this different behavior and appreciate a solution for this
I was trying to test that in each downloads the count should be incremented by 1 in downloaded folder.
Script for testing can be found on : https://gist.github.com/Anilkumar-Shrestha/a81b7b7a4381db54ae8bb9ab9bdf75b4