change: InitWDAClient with options

This commit is contained in:
debugtalk
2022-08-31 18:17:53 +08:00
parent 7f713c5be9
commit 3aed97eab1
7 changed files with 16 additions and 55 deletions
+2 -7
View File
@@ -2,20 +2,15 @@ package uixt
import (
"testing"
"github.com/electricbubble/gwda"
)
func TestDriverExtOCR(t *testing.T) {
driver, err := gwda.NewUSBDriver(nil)
checkErr(t, err)
driverExt, err := Extend(driver, 0.95)
driverExt, err := InitWDAClient()
checkErr(t, err)
x, y, width, height, err := driverExt.FindTextByOCR("抖音")
checkErr(t, err)
t.Logf("x: %v, y: %v, width: %v, height: %v", x, y, width, height)
driver.TapFloat(x, y-20)
driverExt.WebDriver.TapFloat(x+width*0.5, y+height*0.5-20)
}