feat: support pre hook and post hook for actions

This commit is contained in:
lilong.129
2025-05-09 23:01:27 +08:00
parent 433b1cd48d
commit 3715cbb432
10 changed files with 89 additions and 20 deletions
+3 -2
View File
@@ -597,11 +597,12 @@ func (wd *WDADriver) TapAbsXY(x, y float64, opts ...option.ActionOption) error {
x = wd.toScale(x)
y = wd.toScale(y)
var err error
x, y, err = handlerTapAbsXY(wd, x, y, opts...)
actionOptions := option.NewActionOptions(opts...)
x, y, err := preHandler_TapAbsXY(wd, actionOptions, x, y)
if err != nil {
return err
}
defer postHandler(wd, actionOptions)
data := map[string]interface{}{
"x": x,