a11y

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: 16 Imported by: 0

Documentation

Overview

Package a11y provides functions to assist with interacting with accessibility settings in ARC accessibility tests.

Index

Constants

View Source
const (
	// ArcAccessibilityHelperService is the full class name of ArcAccessibilityHelperService.
	ArcAccessibilityHelperService = "org.chromium.arc.accessibilityhelper/org.chromium.arc.accessibilityhelper.ArcAccessibilityHelperService"

	// ApkName is the name of apk which is used in ARC++ accessibility tests.
	ApkName = "ArcAccessibilityTest.apk"

	// CheckBox class name.
	CheckBox = "android.widget.CheckBox"
	// Button class name.
	Button = "android.widget.Button"
	// EditText class name.
	EditText = "android.widget.EditText"
	// SeekBar class name.
	SeekBar = "android.widget.SeekBar"
	// TextView class name.
	TextView = "android.widget.TextView"
	// ToggleButton class name.
	ToggleButton = "android.widget.ToggleButton"
)

Variables

View Source
var EditTextActivity = TestActivity{".EditTextActivity", "Edit Text Activity"}

EditTextActivity is the struct for the edit text activity used in test cases.

View Source
var LiveRegionActivity = TestActivity{".LiveRegionActivity", "Live Region Activity"}

LiveRegionActivity is the struct for the live region text activity used in test cases.

View Source
var MainActivity = TestActivity{".MainActivity", "Main Activity"}

MainActivity is the struct for the main activity used in test cases.

Functions

func EnabledAndroidAccessibilityServices

func EnabledAndroidAccessibilityServices(ctx context.Context, a *arc.ARC) ([]string, error)

EnabledAndroidAccessibilityServices returns enabled AccessibilityService in Android.

func IsEnabledAndroid

func IsEnabledAndroid(ctx context.Context, a *arc.ARC) (bool, error)

IsEnabledAndroid checks if accessibility is enabled in Android.

func RunTest

RunTest installs the ArcAccessibilityTestApplication, launches it, and waits for ChromeVox to be ready. It requires an array activities containing the list of activities to run the test cases over, and the currently running activity is passed as a string to f().

Types

type TestActivity

type TestActivity struct {
	Name  string
	Title string
}

TestActivity represents an activity that will be used as a test case.

Jump to

Keyboard shortcuts

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