feat: save screenshot after action

This commit is contained in:
lilong.129
2025-05-12 17:59:51 +08:00
parent 0722e92e87
commit 9c735bd46a
9 changed files with 72 additions and 50 deletions

View File

@@ -119,7 +119,7 @@ func (wd *BrowserDriver) Drag(fromX, fromY, toX, toY float64, options ...option.
if err != nil {
return err
}
defer postHandler(wd, actionOptions)
defer postHandler(wd, ACTION_Drag, actionOptions)
data := map[string]interface{}{
"from_x": fromX,
@@ -518,7 +518,7 @@ func (wd *BrowserDriver) TapFloat(x, y float64, opts ...option.ActionOption) err
if err != nil {
return err
}
defer postHandler(wd, actionOptions)
defer postHandler(wd, ACTION_TapAbsXY, actionOptions)
duration := 0.1
if actionOptions.Duration > 0 {
@@ -542,7 +542,7 @@ func (wd *BrowserDriver) DoubleTap(x, y float64, options ...option.ActionOption)
if err != nil {
return err
}
defer postHandler(wd, actionOptions)
defer postHandler(wd, ACTION_DoubleTapXY, actionOptions)
data := map[string]interface{}{
"x": x,