mirror of
https://github.com/httprunner/httprunner.git
synced 2026-06-26 18:11:34 +08:00
test: drag direction with random offset
This commit is contained in:
@@ -1 +1 @@
|
||||
v5.0.0-beta-2503171806
|
||||
v5.0.0-beta-2503171813
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user