mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-11 18:11:21 +08:00
refactor:
1, add options for AppLaunch/AppTerminate/AppClear; 2, add pre hook and post hook for AppLaunch/AppTerminate action
This commit is contained in:
@@ -94,6 +94,22 @@ func preHandler_Swipe(driver IDriver, options *option.ActionOptions, rawFomX, ra
|
||||
return fromX, fromY, toX, toY, nil
|
||||
}
|
||||
|
||||
func preHandler_AppLaunch(_ IDriver, options *option.ActionOptions) (err error) {
|
||||
if options.PreHook != nil {
|
||||
options.PreHook()
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func preHandler_AppTerminate(_ IDriver, options *option.ActionOptions) (err error) {
|
||||
if options.PreHook != nil {
|
||||
options.PreHook()
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func postHandler(_ IDriver, options *option.ActionOptions) {
|
||||
if options.PostHook != nil {
|
||||
options.PostHook()
|
||||
|
||||
Reference in New Issue
Block a user