change: handlerTapAbsXY

This commit is contained in:
lilong.129
2025-05-07 17:15:20 +08:00
parent 81f29cdef5
commit 032a130418
7 changed files with 20 additions and 15 deletions
+7 -2
View File
@@ -298,12 +298,17 @@ func (ud *UIA2Driver) TapAbsXY(x, y float64, opts ...option.ActionOption) error
// register(postHandler, new Tap("/wd/hub/session/:sessionId/appium/tap"))
var err error
var duration float64
x, y, duration, err = handlerTapAbsXY(ud, x, y, opts...)
x, y, err = handlerTapAbsXY(ud, x, y, opts...)
if err != nil {
return err
}
actionOptions := option.NewActionOptions(opts...)
duration := 100.0
if actionOptions.PressDuration > 0 {
duration = actionOptions.PressDuration * 1000 // convert to ms
}
data := map[string]interface{}{
"actions": []interface{}{
map[string]interface{}{