You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When downloading the files in Playwright the filenames are in UUID format instead of the application suggested filename. I referred to the issue 7464, where it was mentioned that this is an expected behavior.
Is it possible to override this behavior using the ignoreDefaultArgs option. Something like ignoreDefaultArgs: ['--downloadUniqueFileName'].
In my case my playwright test script takes the responsibility of the uniqueness of filenames in the directory.
The filenames are important to confirm whether the specific file got downloaded. The uniqueness of the filenames are handled by the applications itself. I feel it would be better if there is an option to override the default functionality of files saving as UUID.
The text was updated successfully, but these errors were encountered:
You can receive the real file name by calling download.suggestedFileName() see this guide. This allows you to confirm it via the code inside a test - would that work for you?
Thanks @mxschmitt for the suggestion but that doesn't work for my requirement. Let me explain my use-case and the code-base in detail.
Actually we are a Synthetic Monitoring team where we capture HAR and screenshots for every click action.
We are using Chrome browser and we have our own Chrome plugin that monitors the test executions. This plugin dumps the HAR and screenshots during the respective click actions. During the dump we propose a unique filename (nano timestamp) in a different folder for every execution. We use chrome.downloads.download API for dumping. The problem is even though we are suggesting a filename the files are saved with UUID, without the extensions.
After execution we have another piece of code that parse HAR files as per its filename having extension .har and also uses the filename (timestamp) for the ordering of the visited pages. We also uses the screenshot files having extension .jpg.
Now all the filenames are in UUID format we don't know the file type from filename.
It would be great helpful for our team if you can provide the feature to ignore the default behavior of saving the files in UUID with the option ignoreDefaultArgs: ['--downloadUniqueFileName'].
🚀 Feature Request
When downloading the files in Playwright the filenames are in UUID format instead of the application suggested filename. I referred to the issue 7464, where it was mentioned that this is an expected behavior.
Is it possible to override this behavior using the ignoreDefaultArgs option. Something like ignoreDefaultArgs: ['--downloadUniqueFileName'].
In my case my playwright test script takes the responsibility of the uniqueness of filenames in the directory.
Example
Example: ignoreDefaultArgs: ['--downloadUniqueFileName'].
Motivation
The filenames are important to confirm whether the specific file got downloaded. The uniqueness of the filenames are handled by the applications itself. I feel it would be better if there is an option to override the default functionality of files saving as UUID.
The text was updated successfully, but these errors were encountered: