-1

I am using Squish for test automation.

The squish server runs on the target device. The client runs on the PC. The commands(in test scripts) are sent from the client to the server for execution.

After one of the operations, i need to check if the file is created at a specific location on the target device.

No HTML or browser involved here.

cweiske
  • 30,033
  • 14
  • 133
  • 194
G.S
  • 123
  • 3
  • 11

2 Answers2

0

https://stackoverflow.com/a/12226476/3678718

function checkIfRemoteFileExists(fileToCheck)
{
    var tmp=new Image;
    tmp.src=fileToCheck;

    if(tmp.complete)        
        alert(fileToCheck+" is available");        
    else        
        alert(fileToCheck+" is not available");        
}
Community
  • 1
  • 1
robin
  • 159
  • 5
0

Squish provides a "File" object with an "exists" method.

test.verify(File.exists(filename), "File should exist after what I just went through");

https://doc.froglogic.com/squish/6.0/rgs-js.html#js-File.exists-function

redusek
  • 77
  • 4