Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ public interface AndroidMobileCapabilityType extends CapabilityType {

/**
* Timeout in milliseconds used to wait for the appWaitActivity to launch (default 20000).
* @since 1.6.0
*/
String APP_WAIT_DURATION = "appWaitDuration";

Expand All @@ -65,12 +66,24 @@ public interface AndroidMobileCapabilityType extends CapabilityType {
*/
String DEVICE_READY_TIMEOUT = "deviceReadyTimeout";

/**
* Allow to install a test package which has {@code android:testOnly="true"} in the manifest.
* {@code false} by default
*/
String ALLOW_TEST_PACKAGES = "allowTestPackages";

/**
* Fully qualified instrumentation class. Passed to -w in adb shell
* am instrument -e coverage true -w.
*/
String ANDROID_COVERAGE = "androidCoverage";

/**
* A broadcast action implemented by yourself which is used to dump coverage into file system.
* Passed to -a in adb shell am broadcast -a
*/
String ANDROID_COVERAGE_END_INTENT = "androidCoverageEndIntent";

/**
* (Chrome and webview only) Enable Chromedriver's performance logging (default false).
*
Expand All @@ -97,9 +110,17 @@ public interface AndroidMobileCapabilityType extends CapabilityType {

/**
* Timeout in milliseconds used to wait for an apk to install to the device. Defaults to `90000`.
* @since 1.6.0
*/
String ANDROID_INSTALL_TIMEOUT = "androidInstallTimeout";

/**
* The name of the directory on the device in which the apk will be push before install.
* Defaults to {@code /data/local/tmp}
* @since 1.6.5
*/
String ANDROID_INSTALL_PATH = "androidInstallPath";

/**
* Name of avd to launch.
*/
Expand All @@ -108,12 +129,14 @@ public interface AndroidMobileCapabilityType extends CapabilityType {
/**
* How long to wait in milliseconds for an avd to launch and connect to
* ADB (default 120000).
* @since 0.18.0
*/
String AVD_LAUNCH_TIMEOUT = "avdLaunchTimeout";

/**
* How long to wait in milliseconds for an avd to finish its
* boot animations (default 120000).
* @since 0.18.0
*/
String AVD_READY_TIMEOUT = "avdReadyTimeout";

Expand Down Expand Up @@ -154,8 +177,59 @@ public interface AndroidMobileCapabilityType extends CapabilityType {
*/
String CHROMEDRIVER_EXECUTABLE = "chromedriverExecutable";

/**
* An array of arguments to be passed to the chromedriver binary when it's run by Appium.
* By default no CLI args are added beyond what Appium uses internally (such as {@code --url-base}, {@code --port},
* {@code --adb-port}, and {@code --log-path}.
* @since 1.12.0
*/
String CHROMEDRIVER_ARGS = "chromedriverArgs";

/**
* The absolute path to a directory to look for Chromedriver executables in, for automatic discovery of compatible
* Chromedrivers. Ignored if {@code chromedriverUseSystemExecutable} is {@code true}
* @since 1.8.0
*/
String CHROMEDRIVER_EXECUTABLE_DIR = "chromedriverExecutableDir";

/**
* The absolute path to a file which maps Chromedriver versions to the minimum Chrome that it supports.
* Ignored if {@code chromedriverUseSystemExecutable} is {@code true}
* @since 1.8.0
*/
String CHROMEDRIVER_CHROME_MAPPING_FILE = "chromedriverChromeMappingFile";

/**
* If true, bypasses automatic Chromedriver configuration and uses the version that comes downloaded with Appium.
* Ignored if {@code chromedriverExecutable} is set. Defaults to {@code false}
* @since 1.9.0
*/
String CHROMEDRIVER_USE_SYSTEM_EXECUTABLE = "chromedriverUseSystemExecutable";

/**
* Numeric port to start Chromedriver on. Note that use of this capability is discouraged as it will cause undefined
* behavior in case there are multiple webviews present. By default Appium will find a free port.
*/
String CHROMEDRIVER_PORT = "chromedriverPort";

/**
* A list of valid ports for Appium to use for communication with Chromedrivers. This capability supports multiple
* webview scenarios. The form of this capability is an array of numeric ports, where array items can themselves be
* arrays of length 2, where the first element is the start of an inclusive range and the second is the end.
* By default, Appium will use any free port.
* @since 1.13.0
*/
String CHROMEDRIVER_PORTS = "chromedriverPorts";

/**
* Sets the chromedriver flag {@code --disable-build-check} for Chrome webview tests.
* @since 1.11.0
*/
String CHROMEDRIVER_DISABLE_BUILD_CHECK = "chromedriverDisableBuildCheck";

/**
* Amount of time to wait for Webview context to become active, in ms. Defaults to 2000.
* @since 1.5.2
*/
String AUTO_WEBVIEW_TIMEOUT = "autoWebviewTimeout";

Expand Down Expand Up @@ -190,11 +264,13 @@ public interface AndroidMobileCapabilityType extends CapabilityType {
* the test app using adb. In other words, with dontStopAppOnReset set to true,
* we will not include the -S flag in the adb shell am start call.
* With this capability omitted or set to false, we include the -S flag. Default false
* @since 1.4.0
*/
String DONT_STOP_APP_ON_RESET = "dontStopAppOnReset";

/**
* Enable Unicode input, default false.
* @since 1.2.0
*/
String UNICODE_KEYBOARD = "unicodeKeyboard";

Expand All @@ -207,6 +283,7 @@ public interface AndroidMobileCapabilityType extends CapabilityType {
/**
* Skip checking and signing of app with debug keys, will work only with
* UiAutomator and not with selendroid, default false.
* @since 1.2.2
*/
String NO_SIGN = "noSign";

Expand All @@ -223,6 +300,7 @@ public interface AndroidMobileCapabilityType extends CapabilityType {
* Disables android watchers that watch for application not responding and application crash,
* this will reduce cpu usage on android device/emulator. This capability will work only with
* UiAutomator and not with selendroid, default false.
* @since 1.4.0
*/
String DISABLE_ANDROID_WATCHERS = "disableAndroidWatchers";

Expand All @@ -243,25 +321,65 @@ public interface AndroidMobileCapabilityType extends CapabilityType {
/**
* In a web context, use native (adb) method for taking a screenshot, rather than proxying
* to ChromeDriver, default false.
* @since 1.5.3
*/
String NATIVE_WEB_SCREENSHOT = "nativeWebScreenshot";

/**
* The name of the directory on the device in which the screenshot will be put.
* Defaults to /data/local/tmp.
* @since 1.6.0
*/
String ANDROID_SCREENSHOT_PATH = "androidScreenshotPath";

/**
* Set the network speed emulation. Specify the maximum network upload and download speeds. Defaults to {@code full}
*/
String NETWORK_SPEED = "networkSpeed";

/**
* Toggle gps location provider for emulators before starting the session. By default the emulator will have this
* option enabled or not according to how it has been provisioned.
*/
String GPS_ENABLED = "gpsEnabled";

/**
* Set this capability to {@code true} to run the Emulator headless when device display is not needed to be visible.
* {@code false} is the default value. isHeadless is also support for iOS, check XCUITest-specific capabilities.
*/
String IS_HEADLESS = "isHeadless";

/**
* Timeout in milliseconds used to wait for adb command execution. Defaults to {@code 20000}
*/
String ADB_EXEC_TIMEOUT = "adbExecTimeout";

/**
* Sets the locale <a href="https://developer.android.com/reference/java/util/Locale>script</a>.
* @since 1.10.0
*/
String LOCALE_SCRIPT = "localeScript";

/**
* Skip device initialization which includes i.a.: installation and running of Settings app or setting of
* permissions. Can be used to improve startup performance when the device was already used for automation and
* it's prepared for the next automation. Defaults to {@code false}
* @since 1.11.0
*/
String SKIP_DEVICE_INITIALIZATION = "skipDeviceInitialization";

/**
* Have Appium automatically determine which permissions your app requires and
* grant them to the app on install. Defaults to false.
* grant them to the app on install. Defaults to {@code false}. If noReset is {@code true}, this capability doesn't
* work.
*/
String AUTO_GRANT_PERMISSIONS = "autoGrantPermissions";

/**
* Allow for correct handling of orientation on landscape-oriented devices.
* Set to {@code true} to basically flip the meaning of {@code PORTRAIT} and {@code LANDSCAPE}.
* Defaults to {@code false}.
* @since 1.6.4
*/
String ANDROID_NATURAL_ORIENTATION = "androidNaturalOrientation";

Expand All @@ -276,4 +394,58 @@ public interface AndroidMobileCapabilityType extends CapabilityType {
* Parallel Testing Setup Guide</a> for more details.
*/
String SYSTEM_PORT = "systemPort";

/**
* Optional remote ADB server host.
* @since 1.7.0
*/
String REMOTE_ADB_HOST = "remoteAdbHost";

/**
* Skips unlock during session creation. Defaults to {@code false}
*/
String SKIP_UNLOCK = "skipUnlock";

/**
* Unlock the target device with particular lock pattern instead of just waking up the device with a helper app.
* It works with {@code unlockKey} capability. Defaults to undefined. {@code fingerprint} is available only for
* Android 6.0+ and emulators.
* Read <a href="https://github.com/appium/appium-android-driver/blob/master/docs/UNLOCK.md">unlock doc</a> in
* android driver.
*/
String UNLOCK_TYPE = "unlockType";

/**
* A key pattern to unlock used by {@code unlockType}.
*/
String UNLOCK_KEY = "unlockKey";

/**
* Initializing the app under test automatically.
* Appium does not launch the app under test if this is {@code false}. Defaults to {@code true}
*/
String AUTO_LAUNCH = "autoLaunch";

/**
* Skips to start capturing logcat. It might improve performance such as network.
* Log related commands will not work. Defaults to {@code false}.
* @since 1.12.0
*/
String SKIP_LOGCAT_CAPTURE = "skipLogcatCapture";

/**
* A package, list of packages or * to uninstall package/s before installing apks for test.
* {@code '*'} uninstall all of thrid-party packages except for packages which is necessary for Appium to test such
* as {@code io.appium.settings} or {@code io.appium.uiautomator2.server} since Appium already contains the logic to
* manage them.
* @since 1.12.0
*/
String UNINSTALL_OTHER_PACKAGES = "uninstallOtherPackages";

/**
* Set device animation scale zero if the value is {@code true}. After session is complete, Appium restores the
* animation scale to it's original value. Defaults to {@code false}
* @since 1.9.0
*/
String DISABLE_WINDOW_ANIMATION = "disableWindowAnimation";
}