change: add logs

This commit is contained in:
lilong.129
2025-03-17 20:16:22 +08:00
parent 7d8efaa540
commit fb3f8a6fca
6 changed files with 66 additions and 2 deletions
+5
View File
@@ -5,6 +5,7 @@ import (
"github.com/httprunner/httprunner/v5/uixt/ai"
"github.com/httprunner/httprunner/v5/uixt/option"
"github.com/rs/zerolog/log"
)
func (dExt *XTDriver) TapByOCR(text string, opts ...option.ActionOption) error {
@@ -27,6 +28,8 @@ func (dExt *XTDriver) TapByOCR(text string, opts ...option.ActionOption) error {
} else {
point = textRect.Center()
}
log.Info().Str("text", text).Interface("rawTextRect", textRect).
Interface("tapPoint", point).Msg("TapByOCR success")
return dExt.TapAbsXY(point.X, point.Y, opts...)
}
@@ -48,6 +51,8 @@ func (dExt *XTDriver) TapByCV(opts ...option.ActionOption) error {
} else {
point = uiResult.Center()
}
log.Info().Interface("rawUIResult", uiResult).
Interface("tapPoint", point).Msg("TapByCV success")
return dExt.TapAbsXY(point.X, point.Y, opts...)
}