feat: save screenshot after action

This commit is contained in:
lilong.129
2025-05-12 18:04:56 +08:00
parent 0722e92e87
commit 9c735bd46a
9 changed files with 72 additions and 50 deletions
+3 -3
View File
@@ -602,7 +602,7 @@ func (wd *WDADriver) TapAbsXY(x, y float64, opts ...option.ActionOption) error {
if err != nil {
return err
}
defer postHandler(wd, actionOptions)
defer postHandler(wd, ACTION_TapAbsXY, actionOptions)
data := map[string]interface{}{
"x": x,
@@ -627,7 +627,7 @@ func (wd *WDADriver) DoubleTap(x, y float64, opts ...option.ActionOption) error
if err != nil {
return err
}
defer postHandler(wd, actionOptions)
defer postHandler(wd, ACTION_DoubleTapXY, actionOptions)
data := map[string]interface{}{
"x": x,
@@ -664,7 +664,7 @@ func (wd *WDADriver) Drag(fromX, fromY, toX, toY float64, opts ...option.ActionO
if err != nil {
return err
}
defer postHandler(wd, actionOptions)
defer postHandler(wd, ACTION_Drag, actionOptions)
data := map[string]interface{}{
"fromX": math.Round(fromX*10) / 10,