refactor: replace NewDriver args with options

This commit is contained in:
lilong.129
2023-08-11 15:21:57 +08:00
parent cbc72c99d4
commit 6964bb6c85
12 changed files with 58 additions and 22 deletions

View File

@@ -13,7 +13,7 @@ func init() {
}
func TestDriverExt_TapXY(t *testing.T) {
driverExt, err := iosDevice.NewDriver(nil)
driverExt, err := iosDevice.NewDriver()
checkErr(t, err)
err = driverExt.TapXY(0.4, 0.5)
@@ -21,7 +21,7 @@ func TestDriverExt_TapXY(t *testing.T) {
}
func TestDriverExt_TapAbsXY(t *testing.T) {
driverExt, err := iosDevice.NewDriver(nil)
driverExt, err := iosDevice.NewDriver()
checkErr(t, err)
err = driverExt.TapAbsXY(100, 300)
@@ -29,7 +29,7 @@ func TestDriverExt_TapAbsXY(t *testing.T) {
}
func TestDriverExt_TapWithOCR(t *testing.T) {
driverExt, err := iosDevice.NewDriver(nil)
driverExt, err := iosDevice.NewDriver()
checkErr(t, err)
// 需要点击文字上方的图标