Retrieve downloaded file in python

I am running Selenium tests on LambdaTest . i’m exporting one file . My goal is to Retrieve the exported file programmatically in python and Save it directly to my NAS directory

During the session, a file is exported and saved in the LambdaTest environment (e.g., export_11012025-1826.xls). I can confirm from the LambdaTest dashboard that the file is successfully downloaded during the session.

Now, I need to transfer the file from the LambdaTest environment to my NAS . I’ve tried using the API endpoint to list files:

GET https://automation.lambdatest.com/api/v1/sessions/<session_id>/files

But the response returns either HTML content or fails to fetch the file details.

Could you please guide me?

Thank you for your support!

Best regards,
Fabio

Hello Fabio,

In order to download a file from Selenium tests running on LambdaTest to your local machine in Python, please use API from our API doc: LambdaTest API Documentation | LambdaTest

Under User-files, there is an API which reads as “Download User files from Lambda storage to my local machine.” Please validate the file name must be uploaded to lambda storage and run the API to download file in your local machine