mirror of
https://github.com/httprunner/httprunner.git
synced 2026-09-05 23:51:25 +08:00
feat: swipe with identifier for logging
This commit is contained in:
@@ -4,29 +4,6 @@ import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestDriverExt_Swipe(t *testing.T) {
|
||||
driverExt, err := InitWDAClient()
|
||||
checkErr(t, err)
|
||||
|
||||
pathSearch := "/Users/hero/Documents/temp/2020-05/opencv/flag7.png"
|
||||
|
||||
// gwda.SetDebug(true)
|
||||
|
||||
err = driverExt.Swipe(pathSearch, 300, 500)
|
||||
checkErr(t, err)
|
||||
|
||||
err = driverExt.SwipeFloat(pathSearch, 300.9, 500)
|
||||
checkErr(t, err)
|
||||
|
||||
err = driverExt.SwipeOffset(pathSearch, 300, 500, 0.2, 0.5)
|
||||
checkErr(t, err)
|
||||
|
||||
driverExt.Debug(DmNotMatch)
|
||||
|
||||
err = driverExt.OnlyOnceThreshold(0.92).SwipeOffsetFloat(pathSearch, 300.9, 499.1, 0.2, 0.5)
|
||||
checkErr(t, err)
|
||||
}
|
||||
|
||||
func TestSwipeUntil(t *testing.T) {
|
||||
driverExt, err := InitWDAClient()
|
||||
checkErr(t, err)
|
||||
@@ -46,7 +23,7 @@ func TestSwipeUntil(t *testing.T) {
|
||||
|
||||
// swipe to first screen
|
||||
for i := 0; i < 5; i++ {
|
||||
driverExt.SwipeTo("right")
|
||||
driverExt.SwipeRight()
|
||||
}
|
||||
|
||||
// swipe until app found
|
||||
|
||||
Reference in New Issue
Block a user