mirror of
https://github.com/httprunner/httprunner.git
synced 2026-08-27 11:10:31 +08:00
refactor: NewXTDriver api, return error if init failed
This commit is contained in:
@@ -52,7 +52,7 @@ func launchAppDriver(pkgName string) (driverExt *uixt.XTDriver, err error) {
|
||||
|
||||
time.Sleep(15 * time.Second)
|
||||
|
||||
driverExt = uixt.NewXTDriver(driver)
|
||||
driverExt, _ = uixt.NewXTDriver(driver)
|
||||
|
||||
// 处理弹窗
|
||||
err = driverExt.ClosePopupsHandler()
|
||||
|
||||
@@ -7,7 +7,6 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/httprunner/httprunner/v5/uixt"
|
||||
"github.com/httprunner/httprunner/v5/uixt/ai"
|
||||
"github.com/httprunner/httprunner/v5/uixt/option"
|
||||
)
|
||||
|
||||
@@ -53,8 +52,8 @@ func launchAppDriver(pkgName string) (driverExt *uixt.XTDriver, err error) {
|
||||
|
||||
time.Sleep(15 * time.Second)
|
||||
|
||||
driverExt = uixt.NewXTDriver(driver,
|
||||
ai.WithCVService(ai.CVServiceTypeVEDEM))
|
||||
driverExt, _ = uixt.NewXTDriver(driver,
|
||||
option.WithCVService(option.CVServiceTypeVEDEM))
|
||||
|
||||
// 处理弹窗
|
||||
err = driverExt.ClosePopupsHandler()
|
||||
|
||||
Reference in New Issue
Block a user