refactor: merge swipe methods

This commit is contained in:
lilong.129
2025-02-11 21:01:45 +08:00
parent cf1f553489
commit 3b450ce97f
14 changed files with 74 additions and 110 deletions

View File

@@ -66,7 +66,7 @@ type IDriver interface {
TapByTexts(actions ...TapTextAction) error // TODO: remove
// swipe
Drag(fromX, fromY, toX, toY float64, opts ...option.ActionOption) error
Swipe(fromX, fromY, toX, toY float64, opts ...option.ActionOption) error
Swipe(fromX, fromY, toX, toY float64, opts ...option.ActionOption) error // by percentage
// input
Input(text string, opts ...option.ActionOption) error
Backspace(count int, opts ...option.ActionOption) error
@@ -102,15 +102,6 @@ type IDriverExt interface {
TapByOCR(text string, opts ...option.ActionOption) error
TapByCV(opts ...option.ActionOption) error // TODO: refactor
// swipe
SwipeRelative(fromX, fromY, toX, toY float64, opts ...option.ActionOption) error
SwipeUp(opts ...option.ActionOption) error
SwipeDown(opts ...option.ActionOption) error
SwipeLeft(opts ...option.ActionOption) error
SwipeRight(opts ...option.ActionOption) error
SwipeToTapApp(appName string, opts ...option.ActionOption) error
CheckPopup() (popup *PopupInfo, err error)
ClosePopupsHandler() error