adbKit

package
v3.26.152 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 21, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Check added in v3.26.104

func Check() (path string, version string, err error)

Check 检查 adb 环境.

@param logger: 可以为nil(默认输出到控制台) @return path: adb可执行文件的绝对路径 @return version: adb版本号

func Clean added in v3.26.104

func Clean(logger *zap.Logger) error

Clean 清理 adb 环境.

!!!: 调用此函数前,需要先调用 Check.

Types

type Client added in v3.26.105

type Client interface {
	GetAddress() string

	GetPhysicalSize() (width int, height int, err error)

	Screenshot(targetPath string) error

	// Tap 点击.
	Tap(x, y int) error
	// LongPress 长按.
	LongPress(x, y int, duration int) error
	// Swipe 滑动.
	Swipe(x1, y1, x2, y2 int, duration int) error

	TapAsHumanBeings(x, y int, axisOffset int) error
	LongPressAsHumanBeings(x, y int, duration int, axisOffset, timeOffset int) error
	SwipeAsHumanBeings(x1, y1, x2, y2 int, duration int, axisOffset, timeOffset int) error
}

func NewClient added in v3.26.105

func NewClient(address string, cleanFlag bool, logger *zap.Logger) (Client, error)

NewClient

@param logger: 可以为nil(默认:丢弃输出)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL