I am testing a API which returns response and for authenticated user along with that also download a file in local. I want to validate that whether the file is downloaded. I have tried
with Postman script using new File("/data/file/abc.json") and new ActiveXObject(“Scripting.FileSystemObject”) but not able to do it.
var testFile= new File("/data/file/abc.json");
if(TestFile.exists()){
console.log(‘The file exists’);
}else{
console.log(‘The file does not exist’);
}
I am getting error ReferenceError: File is not defined
Thanks Amit for your reply. I am new to Postman and started using it just few days back.
Let me try and I’ll come back to you if need more information on this.