Documentation
¶
Index ¶
- Constants
- Variables
- func NoSuchKey(msg string) error
- type ActionOpts
- type ActionResult
- type ActionTarget
- type Aim
- type CheckedTextTyper
- type ClickCounter
- type DeliveryChecker
- type DeliveryVerdict
- type Dialog
- type DialogAnswer
- type DialogAnswerer
- type DialogLog
- type Driver
- type Event
- type ExactRecordingClock
- type Keeper
- type Killer
- type LaunchOpts
- type LostChecker
- type MountedCoverWaiter
- type NetworkMock
- type NetworkMocker
- type Noter
- type PressCut
- type RecordingClock
- type RecordingMark
- type RecordingParts
- type Releaser
- type SettleResult
- type Stall
- type StallReporter
- type VideoClock
Constants ¶
View Source
const ( Delivered = "delivered" NotDelivered = "notDelivered" Unknown = "unknown" )
Variables ¶
View Source
var ErrNoSuchKey = errors.New("no such key")
Functions ¶
Types ¶
type ActionOpts ¶
type ActionResult ¶
type ActionResult struct {
Probed bool
Targeted bool
Withheld string
WithheldWhy string
LiveFrame *ui.Rect
Cancelled bool
Touch string
Guarded bool
ChangedSinceRead bool
Settle SettleResult
InjectMs int
SettleMs int
Seq int64
AimAt *ui.Rect
Clicked *bool
ClicksBefore *int64
NotInjected string
PressCut *PressCut
WindowWait time.Duration
FirstInWindow bool
WindowAge time.Duration
WindowOver bool
AppEntering bool
Unconfirmed bool
DeliveryToken int64
Reached bool
Typing string
}
type ActionTarget ¶ added in v0.4.0
type CheckedTextTyper ¶ added in v0.4.0
type CheckedTextTyper interface {
TypeTextChecked(context.Context, string, ActionOpts) (ActionResult, error)
}
type ClickCounter ¶ added in v0.4.0
type DeliveryChecker ¶ added in v0.6.0
type DeliveryVerdict ¶ added in v0.6.0
type DialogAnswer ¶ added in v0.5.3
type DialogAnswerer ¶ added in v0.5.3
type DialogAnswerer interface {
AnswerDialogs(ctx context.Context, a DialogAnswer) error
}
type Driver ¶
type Driver interface {
Platform() string
Serial() string
Name() string
Size() (w, h int)
Screen(ctx context.Context) (*ui.Screen, error)
Seq() int64
Events() (<-chan Event, func())
WaitSettled(ctx context.Context, timeout time.Duration) error
Settle(ctx context.Context, since int64, noChangeMs int, timeout time.Duration) (SettleResult, error)
Tap(ctx context.Context, x, y int, o ActionOpts) (ActionResult, error)
DoubleTap(ctx context.Context, x, y int, o ActionOpts) (ActionResult, error)
LongPress(ctx context.Context, x, y int, hold time.Duration, o ActionOpts) (ActionResult, error)
Swipe(ctx context.Context, x1, y1, x2, y2 int, dur time.Duration, o ActionOpts) (ActionResult, error)
TypeText(ctx context.Context, text string, o ActionOpts) (ActionResult, error)
EraseText(ctx context.Context, n int, o ActionOpts) (ActionResult, error)
PressKey(ctx context.Context, key string, o ActionOpts) (ActionResult, error)
HideKeyboard(ctx context.Context) error
Screenshot(ctx context.Context, scale float64, format string) ([]byte, error)
LaunchApp(ctx context.Context, appID string, o LaunchOpts) error
StopApp(ctx context.Context, appID string) error
KillApp(ctx context.Context, appID string) error
ClearState(ctx context.Context, appID string) error
ClearKeychain(ctx context.Context) error
OpenLink(ctx context.Context, link, appID string, autoVerify, browser bool) error
SetPermissions(ctx context.Context, appID string, perms map[string]string) error
SetLocation(ctx context.Context, lat, lon float64) error
SetOrientation(ctx context.Context, orientation string) error
SetAirplaneMode(ctx context.Context, on bool) error
ToggleAirplaneMode(ctx context.Context) error
AddMedia(ctx context.Context, paths []string) error
InstallApp(ctx context.Context, path string) error
Foreground(ctx context.Context) (string, error)
WaitForApp(ctx context.Context, appID string, timeout time.Duration) error
StartRecording(ctx context.Context, path string) error
StopRecording(ctx context.Context) error
Close() error
}
type ExactRecordingClock ¶ added in v0.6.1
type ExactRecordingClock interface {
RecordingClockExact() bool
}
type LaunchOpts ¶
type LostChecker ¶ added in v0.5.3
type LostChecker interface {
Lost() error
}
type MountedCoverWaiter ¶ added in v0.4.0
type NetworkMock ¶ added in v0.5.3
type NetworkMocker ¶ added in v0.5.3
type RecordingClock ¶ added in v0.6.0
type RecordingMark ¶ added in v0.6.2
type RecordingParts ¶ added in v0.5.3
type RecordingParts interface {
RecordingParts() []string
}
type SettleResult ¶
type SettleResult string
const ( Changed SettleResult = "changed" NoChange SettleResult = "no_change" Restless SettleResult = "timeout" )
type StallReporter ¶ added in v0.5.3
Click to show internal directories.
Click to hide internal directories.