|
| 1 | +/* |
| 2 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
| 3 | + * you may not use this file except in compliance with the License. |
| 4 | + * See the NOTICE file distributed with this work for additional |
| 5 | + * information regarding copyright ownership. |
| 6 | + * You may obtain a copy of the License at |
| 7 | + * |
| 8 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | + * |
| 10 | + * Unless required by applicable law or agreed to in writing, software |
| 11 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | + * See the License for the specific language governing permissions and |
| 14 | + * limitations under the License. |
| 15 | + */ |
| 16 | + |
| 17 | +package io.appium.java_client.remote; |
| 18 | + |
| 19 | + |
| 20 | +import org.openqa.selenium.remote.CapabilityType; |
| 21 | + |
| 22 | +/** |
| 23 | + * The list of Android-specific capabilities |
| 24 | + * Read: https://github.com/appium/appium/blob/1.5/docs/en/writing-running-appium/caps.md#android-only |
| 25 | + */ |
| 26 | +public interface AndroidMobileCapabilityType extends CapabilityType { |
| 27 | + /** |
| 28 | + * Activity name for the Android activity you want to launch from your package. This often needs to be preceded |
| 29 | + * by a . (e.g., .MainActivity instead of MainActivity) |
| 30 | + */ |
| 31 | + String APP_ACTIVITY = "appActivity"; |
| 32 | + |
| 33 | + /** |
| 34 | + * Java package of the Android app you want to run |
| 35 | + */ |
| 36 | + String APP_PACKAGE = "appPackage"; |
| 37 | + |
| 38 | + /** |
| 39 | + * Activity name for the Android activity you want to wait for |
| 40 | + */ |
| 41 | + String APP_WAIT_ACTIVITY = "appWaitActivity"; |
| 42 | + |
| 43 | + /** |
| 44 | + * Java package of the Android app you want to wait for |
| 45 | + */ |
| 46 | + String APP_WAIT_PACKAGE = "appWaitPackage"; |
| 47 | + |
| 48 | + /** |
| 49 | + * Timeout in seconds while waiting for device to become ready |
| 50 | + */ |
| 51 | + String DEVICE_READY_TIMEOUT = "deviceReadyTimeout"; |
| 52 | + |
| 53 | + /** |
| 54 | + * Fully qualified instrumentation class. Passed to -w in adb shell am instrument -e coverage true -w |
| 55 | + */ |
| 56 | + String ANDROID_COVERAGE = "androidCoverage"; |
| 57 | + |
| 58 | + /** |
| 59 | + * (Chrome and webview only) Enable Chromedriver's performance logging (default false) |
| 60 | + */ |
| 61 | + String ENABLE_PERFORMANCE_LOGGING = "enablePerformanceLogging"; |
| 62 | + |
| 63 | + /** |
| 64 | + * Timeout in seconds used to wait for a device to become ready after booting |
| 65 | + */ |
| 66 | + String ANDROID_DEVICE_READY_TIMEOUT = "androidDeviceReadyTimeout"; |
| 67 | + |
| 68 | + /** |
| 69 | + * Port used to connect to the ADB server (default 5037) |
| 70 | + */ |
| 71 | + String ADB_PORT = "adbPort"; |
| 72 | + |
| 73 | + /** |
| 74 | + * Devtools socket name. Needed only when tested app is a Chromium embedding browser. |
| 75 | + * The socket is open by the browser and Chromedriver connects to it as a devtools client. |
| 76 | + */ |
| 77 | + String ANDROID_DEVICE_SOCKET = "androidDeviceSocket"; |
| 78 | + |
| 79 | + /** |
| 80 | + * Name of avd to launch |
| 81 | + */ |
| 82 | + String AVD = "avd"; |
| 83 | + |
| 84 | + /** |
| 85 | + * How long to wait in milliseconds for an avd to launch and connect to ADB (default 120000) |
| 86 | + */ |
| 87 | + String AVD_LAUNCH_TIMEOUT = "avdLaunchTimeout"; |
| 88 | + |
| 89 | + /** |
| 90 | + * How long to wait in milliseconds for an avd to finish its boot animations (default 120000) |
| 91 | + */ |
| 92 | + String AVD_READY_TIMEOUT = "avdReadyTimeout"; |
| 93 | + |
| 94 | + /** |
| 95 | + * Additional emulator arguments used when launching an avd |
| 96 | + */ |
| 97 | + String AVD_ARGS = "avdArgs"; |
| 98 | + |
| 99 | + /** |
| 100 | + * Use a custom keystore to sign apks, default false |
| 101 | + */ |
| 102 | + String USE_KEYSTORE = "useKeystore"; |
| 103 | + |
| 104 | + /** |
| 105 | + * Path to custom keystore, default ~/.android/debug.keystore |
| 106 | + */ |
| 107 | + String KEYSTORE_PATH = "keystorePath"; |
| 108 | + |
| 109 | + /** |
| 110 | + * Password for custom keystore |
| 111 | + */ |
| 112 | + String KEYSTORE_PASSWORD = "keystorePassword"; |
| 113 | + |
| 114 | + /** |
| 115 | + * Alias for key |
| 116 | + */ |
| 117 | + String KEY_ALIAS = "keyAlias"; |
| 118 | + |
| 119 | + /** |
| 120 | + * Password for key |
| 121 | + */ |
| 122 | + String KEY_PASSWORD = "keyPassword"; |
| 123 | + |
| 124 | + /** |
| 125 | + * The absolute local path to webdriver executable (if Chromium embedder provides its own webdriver, |
| 126 | + * it should be used instead of original chromedriver bundled with Appium) |
| 127 | + */ |
| 128 | + String CHROMEDRIVER_EXECUTABLE = "chromedriverExecutable"; |
| 129 | + |
| 130 | + /** |
| 131 | + * Amount of time to wait for Webview context to become active, in ms. Defaults to 2000 |
| 132 | + */ |
| 133 | + String AUTO_WEBVIEW_TIMEOUT = "autoWebviewTimeout"; |
| 134 | + |
| 135 | + /** |
| 136 | + * Intent action which will be used to start activity (default android.intent.action.MAIN) |
| 137 | + */ |
| 138 | + String INTENT_ACTION = "intentAction"; |
| 139 | + |
| 140 | + /** |
| 141 | + * Intent category which will be used to start activity (default android.intent.category.LAUNCHER) |
| 142 | + */ |
| 143 | + String INTENT_CATEGORY = "intentCategory"; |
| 144 | + |
| 145 | + /** |
| 146 | + * Flags that will be used to start activity (default 0x10200000) |
| 147 | + */ |
| 148 | + String INTENT_FLAGS = "intentFlags"; |
| 149 | + |
| 150 | + /** |
| 151 | + * Additional intent arguments that will be used to start activity. See Intent arguments: |
| 152 | + * http://developer.android.com/tools/help/adb.html#IntentSpec |
| 153 | + */ |
| 154 | + String OPTIONAL_INTENT_ARGUMENTS = "optionalIntentArguments"; |
| 155 | + |
| 156 | + /** |
| 157 | + * Doesn't stop the process of the app under test, before starting the app using adb. |
| 158 | + * If the app under test is created by another anchor app, setting this false, |
| 159 | + * allows the process of the anchor app to be still alive, during the start of the test app using adb. |
| 160 | + * In other words, with dontStopAppOnReset set to true, we will not include the -S flag in the adb shell am start call. |
| 161 | + * With this capability omitted or set to false, we include the -S flag. Default false |
| 162 | + */ |
| 163 | + String DONT_STOP_APP_ON_RESET = "dontStopAppOnReset"; |
| 164 | + |
| 165 | + /** |
| 166 | + * Enable Unicode input, default false |
| 167 | + */ |
| 168 | + String UNICODE_KEYBOARD = "unicodeKeyboard"; |
| 169 | + |
| 170 | + /** |
| 171 | + * Reset keyboard to its original state, after running Unicode tests with unicodeKeyboard capability. |
| 172 | + * Ignored if used alone. Default false |
| 173 | + */ |
| 174 | + String RESET_KEYBOARD = "resetKeyboard"; |
| 175 | + |
| 176 | + /** |
| 177 | + * Skip checking and signing of app with debug keys, will work only with |
| 178 | + * UiAutomator and not with selendroid, default false |
| 179 | + */ |
| 180 | + String NO_SIGN = "noSign"; |
| 181 | + |
| 182 | + /** |
| 183 | + * Calls the setCompressedLayoutHierarchy() uiautomator function. This capability can speed up test execution, |
| 184 | + * since Accessibility commands will run faster ignoring some elements. The ignored elements will not be findable, |
| 185 | + * which is why this capability has also been implemented as a toggle-able setting as well as a capability. |
| 186 | + * Defaults to false |
| 187 | + */ |
| 188 | + String IGNORE_UNIMPORTANT_VIEWS = "ignoreUnimportantViews"; |
| 189 | + |
| 190 | + /** |
| 191 | + * Disables android watchers that watch for application not responding and application crash, |
| 192 | + * this will reduce cpu usage on android device/emulator. This capability will work only with |
| 193 | + * UiAutomator and not with selendroid, default false |
| 194 | + */ |
| 195 | + String DISABLE_ANDROID_WATCHERS = "disableAndroidWatchers"; |
| 196 | + |
| 197 | + /** |
| 198 | + * Allows passing chromeOptions capability for ChromeDriver. For more information see chromeOptions: |
| 199 | + * https://sites.google.com/a/chromium.org/chromedriver/capabilities |
| 200 | + */ |
| 201 | + String CHROME_OPTIONS = "chromeOptions"; |
| 202 | + |
| 203 | + /** |
| 204 | + * Kill ChromeDriver session when moving to a non-ChromeDriver webview. Defaults to false |
| 205 | + */ |
| 206 | + String RECREATE_CHROME_DRIVER_SESSIONS = "recreateChromeDriverSessions"; |
| 207 | + |
| 208 | + String SELENDROID_PORT = "selendroidPort"; |
| 209 | +} |
0 commit comments