Can I download a file that was downloaded during a Selenium automation test?

Is there any way to download a file that was downloaded during a Selenium automation test session onto my local machine?

Hi Ian,

Yes, the file can be downloaded in your local machine using the lambda-file-content LambdaHook. You can refer to the below code for reference(Java):

    **Selenium file download command"
    Thread.sleep(300000);
    System.out.println("Before Lambda file content done");
    String base64EncodedFile = ((JavascriptExecutor) driver).executeScript("lambda-file-content=feed_014.zip").toString(); // file content download
    System.out.println("Lambda file content done");
    byte[] byteArray = Base64.decodeBase64(base64EncodedFile.getBytes());
    FileOutputStream fos;
    File file=new File("D:\\Code Stuff\\Test1\\trepp\\feed_014.zip");
    fos = new FileOutputStream(file);
    System.out.println("Before fos.write");
    fos.write(byteArray);
    System.out.println("After fos.write");
    fos.close();
    System.out.println("FOS"+fos);