feat: add pre hook and post hook for DoubleTap action

This commit is contained in:
lilong.129
2025-05-09 23:06:45 +08:00
parent 3715cbb432
commit f7ec4a06b4
6 changed files with 21 additions and 13 deletions

View File

@@ -535,11 +535,13 @@ func (wd *BrowserDriver) TapFloat(x, y float64, opts ...option.ActionOption) err
// DoubleTap Sends a double tap event at the coordinate.
func (wd *BrowserDriver) DoubleTap(x, y float64, options ...option.ActionOption) error {
var err error
x, y, err = handlerDoubleTap(wd, x, y, options...)
actionOptions := option.NewActionOptions(options...)
x, y, err := preHandler_DoubleTap(wd, actionOptions, x, y)
if err != nil {
return err
}
defer postHandler(wd, actionOptions)
data := map[string]interface{}{
"x": x,
"y": y,