change: tap/swipe with offset

This commit is contained in:
lilong.129
2025-03-17 14:36:09 +08:00
parent b412fa193b
commit 3e7e9b0ef9
5 changed files with 27 additions and 12 deletions
+13
View File
@@ -168,3 +168,16 @@ func TestDriverExt_ClosePopupsHandler(t *testing.T) {
err := driver.ClosePopupsHandler()
assert.Nil(t, err)
}
func TestDriverExt_Action_Risk(t *testing.T) {
driver := setupADBDriverExt(t)
// tap point with offset
err := driver.TapXY(0.5, 0.5, option.WithTapOffset(-10, 10))
assert.Nil(t, err)
// swipe direction with offset
err = driver.Swipe(0.5, 0.5, 0.5, 0.9,
option.WithSwipeOffset(-50, 50, -50, 50))
assert.Nil(t, err)
}