From 7d8efaa5409d9fe5b67fbdb5f291e647f46a5ac7 Mon Sep 17 00:00:00 2001 From: "lilong.129" Date: Mon, 17 Mar 2025 18:13:10 +0800 Subject: [PATCH] test: drag direction with random offset --- internal/version/VERSION | 2 +- uixt/driver_ext_test.go | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/internal/version/VERSION b/internal/version/VERSION index 5200bf63..cf0f07e8 100644 --- a/internal/version/VERSION +++ b/internal/version/VERSION @@ -1 +1 @@ -v5.0.0-beta-2503171806 +v5.0.0-beta-2503171813 diff --git a/uixt/driver_ext_test.go b/uixt/driver_ext_test.go index a5a98eaa..243d1493 100644 --- a/uixt/driver_ext_test.go +++ b/uixt/driver_ext_test.go @@ -170,7 +170,7 @@ func TestDriverExt_ClosePopupsHandler(t *testing.T) { assert.Nil(t, err) } -func TestDriverExt_Action_Risk(t *testing.T) { +func TestDriverExt_Action_Offset(t *testing.T) { driver := setupADBDriverExt(t) // tap point with constant offset @@ -191,6 +191,11 @@ func TestDriverExt_Action_Risk(t *testing.T) { option.WithOffsetRandomRange(-50, 50)) assert.Nil(t, err) + // drag direction with random offset + err = driver.Drag(0.5, 0.5, 0.5, 0.9, + option.WithOffsetRandomRange(-50, 50)) + assert.Nil(t, err) + // tap random point in ocr text rect err = driver.TapByOCR("首页", option.WithTapRandomRect(true)) assert.Nil(t, err)