use of com.axway.ats.action.filesystem.RemoteFileSystemOperations in project ats-framework by Axway.
the class RemoteSystemOperations method createScreenshot.
@Override
public String createScreenshot(String filePath) {
try {
String remoteFilePath = null;
int extIndex = filePath.lastIndexOf('.');
if (extIndex > 0) {
remoteFilePath = filePath.substring(extIndex);
}
remoteFilePath = this.remoteSystemOperations.createScreenshot(remoteFilePath);
new RemoteFileSystemOperations(atsAgent).copyFileFrom(remoteFilePath, filePath, true);
} catch (AgentException e) {
throw new SystemOperationException("Could not create screenshot on agent: " + atsAgent, e);
}
return filePath;
}
Aggregations