public bool MakeScreenshot(Result result, string rootFolder) { Result = result; ScreenshotMaker.TakeAndSaveScreenshot(GetFileInfoDtoAndDeleteExistingFiles(rootFolder)); Status = Status.Done; return(true); }
private FileInfoDto GetFileInfoDtoAndDeleteExistingFiles(string rootFolder) { ScreenshotFileInfoDto screenshotFileInfoDto = Parent.GenerateFileInfoForTestCaseItem( new TestCaseItemInfoDto { Item = this, RootFolder = rootFolder, ImageFormat = ScreenshotMaker.ImageFormat }); foreach (string possiblyFileName in screenshotFileInfoDto.GetPossiblyFileNames()) { ScreenshotMaker.RemoveScreenshot(new FileInfoDto(screenshotFileInfoDto.Path, possiblyFileName)); } return(new FileInfoDto(screenshotFileInfoDto.Path, screenshotFileInfoDto.FileName)); }
public bool TargetFolderExists(string rootFolder) { return(ScreenshotMaker.FolderExists(GetTargetFolderPath(rootFolder))); }