fix: fix rotate tap swipe error

This commit is contained in:
余泓铮
2024-03-19 14:44:22 +08:00
parent 4979d4e1e2
commit 9f7795f703
6 changed files with 76 additions and 10 deletions

View File

@@ -11,13 +11,14 @@ import (
)
var (
uiaServerURL = "http://localhost:6790/wd/hub"
uiaServerURL = "http://forward-to-6790:6790/wd/hub"
driverExt *DriverExt
)
func setupAndroid(t *testing.T) {
device, err := NewAndroidDevice()
checkErr(t, err)
device.UIA2 = true
driverExt, err = device.NewDriver()
checkErr(t, err)
}
@@ -215,6 +216,14 @@ func TestDriver_Swipe(t *testing.T) {
}
}
func TestDriver_Swipe_Relative(t *testing.T) {
setupAndroid(t)
err := driverExt.SwipeRelative(0.5, 0.7, 0.5, 0.5)
if err != nil {
t.Fatal(err)
}
}
func TestDriver_Drag(t *testing.T) {
driver, err := NewUIADriver(nil, uiaServerURL)
if err != nil {