feat: log uixt action

This commit is contained in:
lilong.129
2024-11-11 11:13:04 +08:00
parent ec72cb8904
commit 8e7ac41841
5 changed files with 30 additions and 1 deletions

View File

@@ -15,6 +15,7 @@ import (
type ActionMethod string
const (
ACTION_LOG ActionMethod = "log"
ACTION_AppInstall ActionMethod = "install"
ACTION_AppUninstall ActionMethod = "uninstall"
ACTION_AppClear ActionMethod = "app_clear"
@@ -565,6 +566,9 @@ func (dExt *DriverExt) DoAction(action MobileAction) (err error) {
}()
switch action.Method {
case ACTION_LOG:
// TODO: stat action
log.Info().Str("action", action.Params.(string)).Msg("log uixt action")
case ACTION_AppInstall:
if appUrl, ok := action.Params.(string); ok {
if err = dExt.InstallByUrl(appUrl, WithRetryTimes(action.MaxRetryTimes)); err != nil {