Documentation
¶
Overview ¶
Package a11y provides functions to assist with interacting with accessibility settings in ARC accessibility tests.
Index ¶
Constants ¶
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 ¶
var EditTextActivity = TestActivity{".EditTextActivity", "Edit Text Activity"}
EditTextActivity is the struct for the edit text activity used in test cases.
var LiveRegionActivity = TestActivity{".LiveRegionActivity", "Live Region Activity"}
LiveRegionActivity is the struct for the live region text activity used in test cases.
var MainActivity = TestActivity{".MainActivity", "Main Activity"}
MainActivity is the struct for the main activity used in test cases.
Functions ¶
func EnabledAndroidAccessibilityServices ¶
EnabledAndroidAccessibilityServices returns enabled AccessibilityService in Android.
func IsEnabledAndroid ¶
IsEnabledAndroid checks if accessibility is enabled in Android.
func RunTest ¶
func RunTest(ctx context.Context, s *testing.State, activities []TestActivity, f func(context.Context, *a11y.ChromeVoxConn, *chrome.TestConn, TestActivity) error)
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 ¶
TestActivity represents an activity that will be used as a test case.