mirror of
https://github.com/httprunner/httprunner.git
synced 2026-06-12 03:09:43 +08:00
refactor: rename ApplyTapOffset
This commit is contained in:
@@ -173,15 +173,19 @@ func TestDriverExt_ClosePopupsHandler(t *testing.T) {
|
||||
func TestDriverExt_Action_Risk(t *testing.T) {
|
||||
driver := setupADBDriverExt(t)
|
||||
|
||||
// tap point with offset
|
||||
// tap point with constant offset
|
||||
err := driver.TapXY(0.5, 0.5, option.WithTapOffset(-10, 10))
|
||||
assert.Nil(t, err)
|
||||
|
||||
// tap point with random offset
|
||||
err = driver.TapXY(0.5, 0.5, option.WithOffsetRandomRange(-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)
|
||||
|
||||
// tap random point in ocr text rect
|
||||
err = driver.TapByOCR("首页", option.WithTapRandom(true))
|
||||
err = driver.TapByOCR("首页", option.WithTapRandomRect(true))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user