示例#1
0
 public bool MakeScreenshot(Result result, string rootFolder)
 {
     Result = result;
     ScreenshotMaker.TakeAndSaveScreenshot(GetFileInfoDtoAndDeleteExistingFiles(rootFolder));
     Status = Status.Done;
     return(true);
 }
示例#2
0
        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));
        }
示例#3
0
 public bool TargetFolderExists(string rootFolder)
 {
     return(ScreenshotMaker.FolderExists(GetTargetFolderPath(rootFolder)));
 }