control

package
v0.0.0-...-3113a6e Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Controls = map[string]*Control{}

多个手机控制

Functions

This section is empty.

Types

type Control

type Control struct {
	// 等待搜索结果时间
	WaitResultDuration time.Duration
	// 等待搜索按钮弹出
	WaitSearchButtonDuration time.Duration
	*adb.Device

	// 输入框坐标
	InputPosition *Position
	// 清除输入框坐标
	ClearInputPosition *Position
	// 搜索按钮坐标
	SearchButtonPosition *Position
	// contains filtered or unexported fields
}

手机控制结构体

func NewControl

func NewControl(adb *adb.Device, serial string) (*Control, error)

func (*Control) Back

func (c *Control) Back() error

返回到上一页

func (*Control) ClearInput

func (c *Control) ClearInput() error

清除输入框内容

func (*Control) ClickInput

func (c *Control) ClickInput() error

点击输入框

func (*Control) ClickSearch

func (c *Control) ClickSearch() error

点击搜索

func (*Control) Gender

func (c *Control) Gender(phone string) (string, error)

func (*Control) Input

func (c *Control) Input(keyword string) error

func (*Control) Reset

func (c *Control) Reset() error

func (*Control) Serial

func (c *Control) Serial() string

type Position

type Position struct {
	X, Y int
}

type Xml

type Xml struct {
	// contains filtered or unexported fields
}

func NewXml

func NewXml(xml string) *Xml

func (*Xml) Position

func (x *Xml) Position(resourceId string) (*Position, error)

Jump to

Keyboard shortcuts

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