diff --git a/pkg/uixt/driver_ext/ext.go b/pkg/uixt/driver_ext/ext.go index f37541ba..f1b31d26 100644 --- a/pkg/uixt/driver_ext/ext.go +++ b/pkg/uixt/driver_ext/ext.go @@ -1,7 +1,7 @@ package driver_ext import ( - "fmt" + "github.com/rs/zerolog/log" "time" "github.com/httprunner/httprunner/v5/pkg/uixt" @@ -48,15 +48,17 @@ func (dExt *XTDriver) Install(filePath string, opts ...option.InstallOption) err if _, ok := dExt.GetDevice().(*uixt.AndroidDevice); ok { stopChan := make(chan struct{}) go func() { - ticker := time.NewTicker(5 * time.Second) + ticker := time.NewTicker(3 * time.Second) defer ticker.Stop() for { select { case <-ticker.C: - _ = dExt.TapByOCR("^(.*无视风险安装|正在扫描.*|我知道了|稍后继续|稍后提醒|继续安装|知道了|确定|继续|完成|点击继续安装|继续安装旧版本|替换|.*正在安装|安装|授权本次安装|重新安装|仍要安装|更多详情|我知道了|已了解此应用未经检测.)$", option.WithRegex(true), option.WithIgnoreNotFoundError(true)) + go func() { + _ = dExt.TapByOCR("^(.*无视风险安装|正在扫描.*|我知道了|稍后继续|稍后提醒|继续安装|知道了|确定|继续|完成|点击继续安装|继续安装旧版本|替换|.*正在安装|安装|授权本次安装|重新安装|仍要安装|更多详情|我知道了|已了解此应用未经检测.)$", option.WithRegex(true), option.WithIgnoreNotFoundError(true)) + }() case <-stopChan: - fmt.Println("Ticker stopped") + log.Info().Msg("install complete") return } }