mirror of
https://github.com/httprunner/httprunner.git
synced 2026-09-05 07:26:55 +08:00
refactor: NewXTDriver api, return error if init failed
This commit is contained in:
@@ -9,7 +9,6 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"github.com/httprunner/httprunner/v5/uixt"
|
||||
"github.com/httprunner/httprunner/v5/uixt/ai"
|
||||
"github.com/httprunner/httprunner/v5/uixt/option"
|
||||
)
|
||||
|
||||
@@ -23,9 +22,10 @@ func TestIOSDemo(t *testing.T) {
|
||||
|
||||
driver, err := device.NewDriver()
|
||||
assert.Nil(t, err)
|
||||
driverExt := uixt.NewXTDriver(driver,
|
||||
ai.WithCVService(ai.CVServiceTypeVEDEM),
|
||||
driverExt, err := uixt.NewXTDriver(driver,
|
||||
option.WithCVService(option.CVServiceTypeVEDEM),
|
||||
)
|
||||
assert.Nil(t, err)
|
||||
|
||||
// release session
|
||||
defer func() {
|
||||
|
||||
Reference in New Issue
Block a user