refactor: move gwda into uixt

This commit is contained in:
debugtalk
2022-09-23 22:39:43 +08:00
parent e3d0eccde5
commit 8925b595fc
25 changed files with 4474 additions and 247 deletions
+2 -4
View File
@@ -2,13 +2,11 @@ package uixt
import (
"fmt"
"github.com/electricbubble/gwda"
)
func (dExt *DriverExt) tapFloat(x, y float64, identifier string) error {
if len(identifier) > 0 {
option := gwda.WithCustomOption("log", map[string]interface{}{
option := WithCustomOption("log", map[string]interface{}{
"enable": true,
"data": identifier,
})
@@ -122,6 +120,6 @@ func (dExt *DriverExt) TapWithNumberOffset(param string, numberOfTaps int, xOffs
x = x + width*xOffset
y = y + height*yOffset
touchActions := gwda.NewTouchActions().Tap(gwda.NewTouchActionTap().WithXYFloat(x, y).WithCount(numberOfTaps))
touchActions := NewTouchActions().Tap(NewTouchActionTap().WithXYFloat(x, y).WithCount(numberOfTaps))
return dExt.PerformTouchActions(touchActions)
}