refactor: relocate code

This commit is contained in:
lilong.129
2024-09-01 16:32:34 +08:00
parent 3e17d48e5a
commit 6f9946801d
9 changed files with 336 additions and 310 deletions
+1 -1
View File
@@ -56,6 +56,7 @@ func (dExt *DriverExt) GetScreenResult(options ...ActionOption) (screenResult *S
if err != nil {
return
}
dExt.cacheStepData.screenShots = append(dExt.cacheStepData.screenShots, imagePath)
screenResult = &ScreenResult{
bufSource: bufSource,
@@ -171,7 +172,6 @@ func (dExt *DriverExt) GetScreenShot(fileName string) (raw *bytes.Buffer, path s
log.Error().Err(err).Msg("save screenshot file failed")
return nil, "", err
}
dExt.cacheStepData.screenShots = append(dExt.cacheStepData.screenShots, path)
return compressed, path, nil
}