mirror of
https://github.com/httprunner/httprunner.git
synced 2026-09-05 07:26:55 +08:00
refactor: rename options pkg to option
This commit is contained in:
@@ -7,7 +7,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/httprunner/httprunner/v5/pkg/uixt"
|
||||
"github.com/httprunner/httprunner/v5/pkg/uixt/options"
|
||||
"github.com/httprunner/httprunner/v5/pkg/uixt/option"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -29,7 +29,7 @@ func init() {
|
||||
}
|
||||
|
||||
func launchAppDriver(pkgName string) (driver *uixt.DriverExt, err error) {
|
||||
device, _ := uixt.NewAndroidDevice(options.WithSerialNumber(serial))
|
||||
device, _ := uixt.NewAndroidDevice(option.WithSerialNumber(serial))
|
||||
driver, err = device.NewDriver()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -59,7 +59,7 @@ func launchAppDriver(pkgName string) (driver *uixt.DriverExt, err error) {
|
||||
}
|
||||
|
||||
// 进入推荐页
|
||||
err = driver.TapByOCR("推荐", options.WithScope(0, 0, 1, 0.3))
|
||||
err = driver.TapByOCR("推荐", option.WithScope(0, 0, 1, 0.3))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -92,7 +92,7 @@ func watchVideo(driver *uixt.DriverExt) (err error) {
|
||||
|
||||
// 切换横屏
|
||||
err = driver.TapByUIDetection(
|
||||
options.WithScreenShotUITypes("fullScreen"))
|
||||
option.WithScreenShotUITypes("fullScreen"))
|
||||
if err != nil {
|
||||
// 未找到横屏图标,该页面可能不是横版视频(直播|广告|Feed)
|
||||
// 退出回到推荐页
|
||||
|
||||
Reference in New Issue
Block a user