feat: add horizontal scrolling screenshot display and improve screenshot handling in report generation

This commit is contained in:
lilong.129
2025-06-29 18:16:26 +08:00
parent 5baabee89c
commit 0ae22930aa
3 changed files with 144 additions and 23 deletions
+2 -1
View File
@@ -27,6 +27,7 @@ import (
"github.com/httprunner/httprunner/v5/uixt/types"
)
// ScreenResult represents the result of taking a screenshot, including image path, recognition results, and metadata
type ScreenResult struct {
bufSource *bytes.Buffer // raw image buffer bytes
ImagePath string `json:"image_path"` // image file path
@@ -467,7 +468,7 @@ func MarkUIOperation(driver IDriver, actionType option.ActionName, actionCoordin
timestamp := builtin.GenNameWithTimestamp("%d")
imagePath := filepath.Join(
config.GetConfig().ScreenShotsPath(),
fmt.Sprintf("action_%s_pre_%s.png", timestamp, actionType),
fmt.Sprintf("%s_pre_mark_%s.png", timestamp, actionType),
)
switch actionType {