Skip to main content

SeeTestAutomation- GetRemoteFile

info

Please note that this tool is classified as a Legacy tool. We recommend transitioning to our updated solutions to maintain optimal performance and security in your workflows. For more information on this matter, please reach out to technical support .

void getRemoteFile(String remoteLocation, int timeout, String localFile)

Description

getRemoteFile used for downloading files from remote machines (e.g. grid, remote SeeTest) to a client machine.

Parameters

  • remoteLocation: The remote machine relative file path for download.

  • Timeout: Waiting Timeout in milliseconds.

  • localFile: The requested file download destination (can be file or directory)

    info

    It is recommended preferring a directory path over a file path, If a file path is chosen it's important to specify the same file extension like the requested file

Example for getRemoteFile :

 Expand source

package tests;
import com.experitest.client.*;
import org.junit.*;
public class TestEribank {

private String projectBaseDirectory = "C:\\Users\\user\\workspace\\project34";
protected Client client = null;
protected GridClient grid = null;
@Before
public void setUp(){
gridClient = new GridClient(<userName>(string), <userPassword>(string), <userProject>(string), <CloudServerAddress>(string), <cloudServerPort>(int), <isCloudServerSecured>(boolean);
client = gridClient.lockDeviceForExecution(<testName>(string), <device Xpath query>(string), <reservation time in minuets>(int), <Timeout waiting for device in miliseconds(long));
client.setProjectBaseDirectory(projectBaseDirectory);

}
@Test
public void testUntitled() {
client.swipe("Left", 50, 500);
String capture = client .capture(); // The 'capture' method return the relative screenshot file path on the remote machine
client.swipe("Left", 50, 500);

try {
client.getRemoteFile(capture, 20000, "C:\Users\\<userName>(string)\Pictures\Saved Pictures"); // download capture to requested destination
} catch (Exception e) {
e.printStackTrace();
}
}

@After
public void tearDown(){
client.releaseClient();
}
}