mirror of
https://github.com/httprunner/httprunner.git
synced 2026-08-08 07:03:40 +08:00
feat: support pre hook and post hook for actions
This commit is contained in:
@@ -511,13 +511,13 @@ func (wd *BrowserDriver) Tap(x, y float64, options ...option.ActionOption) error
|
||||
}
|
||||
|
||||
func (wd *BrowserDriver) TapFloat(x, y float64, opts ...option.ActionOption) error {
|
||||
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)
|
||||
|
||||
actionOptions := option.NewActionOptions(opts...)
|
||||
duration := 0.1
|
||||
if actionOptions.Duration > 0 {
|
||||
duration = actionOptions.Duration
|
||||
|
||||
Reference in New Issue
Block a user