apputil

package
v0.0.0-...-683b059 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2022 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Overview

Package apputil implements the libraries used to control ARC apps

Package apputil implements the libraries used to control ARC apps

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClickIfExist

func ClickIfExist(obj *ui.Object, timeout time.Duration) action.Action

ClickIfExist returns an action function which clicks the UI object if it exists.

func FindAndClick

func FindAndClick(obj *ui.Object, timeout time.Duration) action.Action

FindAndClick returns an action function which finds and clicks Android ui object.

func WaitForExists

func WaitForExists(obj *ui.Object, timeout time.Duration) action.Action

WaitForExists returns an action function which wait for Android ui object.

Types

type App

type App struct {
	Tconn *chrome.TestConn
	A     *arc.ARC
	D     *ui.Device

	AppName string
	PkgName string
	// contains filtered or unexported fields
}

App holds resources of ARC app.

func NewApp

func NewApp(ctx context.Context, kb *input.KeyboardEventWriter, tconn *chrome.TestConn, a *arc.ARC, appName, pkgName string) (*App, error)

NewApp creates and returns an instance of App which represents and ARC App.

func (*App) Close

func (app *App) Close(ctx context.Context, cr *chrome.Chrome, hasError func() bool, outDir string) error

Close cleans up the ARC app resources, it dumps the ARC UI if hasError returns true, and then closes ARC app. If hasError returns true, screenshot will be taken and UI hierarchy will be dumped to the given dumpDir.

func (*App) GetVersion

func (app *App) GetVersion(ctx context.Context) (version string, err error)

GetVersion gets the version of the ARC app.

func (*App) Install

func (app *App) Install(ctx context.Context) error

Install installs the ARC app with the package name.

func (*App) Launch

func (app *App) Launch(ctx context.Context) error

Launch launches the ARC app. The app has to be installed before calling this function, i.e. `Install(context.Context)` should be called first.

Directories

Path Synopsis
Package vlc contains local Tast tests that exercise vlc.
Package vlc contains local Tast tests that exercise vlc.
Package voicerecorder wraps method and constant of voice recorder app for MTBF testing.
Package voicerecorder wraps method and constant of voice recorder app for MTBF testing.

Jump to

Keyboard shortcuts

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