Appium--desired_capabilities detailed

Source: Internet
Author: User
Tags locale appium

Appium Service Keywords
Key Words Description Example
automationName The automated test engine you want to use Appium(default) orSelendroid
platformName The phone operating system you want to test iOS, Android , orFirefoxOS
platformVersion Mobile OS Version For example: 7.1 ,4.4
deviceName Type of phone or simulator used iPhone Simulator,,,, iPad Simulator iPhone Retina 4-inch Android Emulator Galaxy S4 , et. On IOS, the value of this keyword must be one of the instruments -s devices available device names that are used. On Android, this keyword does not work at this time.
app .ipaEither the .apk local absolute path or the remote path of the or file, or it can be one of the two .zip . Appium will first try to install the path corresponding to the application on the appropriate real machine or simulator. For Android system, if you specify app-package and app-activity (see below), then you can not specify app . and browserName conflict such as /abs/path/to/my.apk orhttp://myapp.com/app.ipa
browserName The name of the mobile Web browser that requires automated testing. If you are automating your application, the value of this keyword should be empty. The IOS system can be used with ' Safari ', Android system can be ' Chrome ', ' Chromium ', or ' Browser '.
newCommandTimeout Sets the command time-out, in seconds. When the timeout is reached and the new command is not received, Appium assumes that the client exits and then ends the session automatically. Like what60
autoLaunch Appium whether the app needs to be installed and started automatically. Default valuetrue true,false
language (sim/emu-only) Sets the language of the simulator (Simulator/emulator). Such as:fr
locale (sim/emu-only) Sets the locale of the simulator (Simulator/emulator). Such as:fr_CA
udid Unique device identity of the connected physical device Such as:1ae203187fc012g
orientation (sim/emu-only) to start the test in a set direction mode LANDSCAPE(landscape) or PORTRAIT (portrait)
autoWebview Translates directly to the WebView context. Default Value false , true,false
noReset Do not reset the app state before the session. The default value false . true,false
fullReset (IOS) To delete the entire emulator directory. (Android) resets the app state by uninstalling-rather than emptying the data. On Android, this also automatically clears the app under test at the end of the session. Default valuefalse true,false
Android specific
Key Words Description Example
appActivity The Android Activity name you want to launch from your app package. It usually needs to be added in front . (e.g., use .MainActivity instead of MainActivity ) MainActivity,.Settings
appPackage The package name of the Android app you want to run For example com.example.android.myApp ,com.android.settings
appWaitActivity You want to wait for the Android Activity name to start SplashActivity
deviceReadyTimeout Set a timeout to wait for an emulator or a real machine to be ready 5
androidCoverage The instrumentation class used to perform the test. As a adb shell am instrument -e coverage true -w parameter to the command -w . com.my.Pkg/com.my.Pkg.instrumentation.MyInstrumentation
enablePerformanceLogging (Chrome and WebView only) turn on Chromedriver Performance Logs. (Default false ) true,false
androidDeviceReadyTimeout Wait for the device to be ready when the app is started. The unit is in seconds. Such as30
androidDeviceSocket The socket name of the development tool. Required only if the application being tested is a browser that uses the Chromium kernel. The socket is opened by the browser and chromedriver it as a developer tool to connect. Such aschrome_devtools_remote
avd The name of the AVD (Android virtual appliance) that needs to be started. Such asapi19
avdLaunchTimeout The time-out in milliseconds to wait for the AVD to start and connect to the ADB. (Default value 120000 ) 300000
avdReadyTimeout The time-out in milliseconds to wait for the AVD to finish starting the animation. (Default value 120000 ) 300000
avdArgs Additional parameters that need to be added when starting the AVD. Such as-netfast
useKeystore Use a custom KeyStore to re-sign the APK. Default valuefalse trueOrfalse
keystorePath The path to the custom KeyStore. Default: ~/.android/debug.keystore Such as/path/to.keystore
keystorePassword Customize the password for the KeyStore. Such asfoo
keyAlias Alias for Key Such asandroiddebugkey
keyPassword Key's password Such asfoo
chromedriverExecutable Webdriver the absolute path to the executable file (if the Chromium core provides the corresponding webdriver, it should be used instead of Appium's own webdriver) /abs/path/to/webdriver
autoWebviewTimeout The time, in milliseconds, to wait for the Webview context to be activated. Default value2000 Such as4
intentAction The intent action used to start the activity. (Default value android.intent.action.MAIN ) such as android.intent.action.MAIN ,android.intent.action.VIEW
intentCategory The intent category used to initiate activity. (Default value android.intent.category.LAUNCHER ) such as android.intent.category.LAUNCHER ,android.intent.category.APP_CONTACTS
intentFlags Flags (default) for initiating activity 0x10200000 Such as0x10200000
optionalIntentArguments The additional intent parameter used to initiate activity. Please see the Intent parameter such as --esn <EXTRA_KEY> ,--ez <EXTRA_KEY> <EXTRA_BOOLEAN_VALUE>
stopAppOnReset Stop the process of the app being tested before using ADB to start the app. If the application being tested is created by another application, when this parameter is set to False, the process that allows another app to continue to survive when using ADB to initiate the application under test. Default valuetrue trueOrfalse
unicodeKeyboard Use the Unicode input method. Default valuefalse trueOrfalse
resetKeyboard After the Unicode test for the keyword has been set, reset the unicodeKeyboard input method to its original state. If used alone, it will be ignored. Default valuefalse trueOrfalse
noSign Skip the steps to check and debug your app. Can only be used when using Uiautomator, using selendroid is not possible. Default valuefalse trueOrfalse
ignoreUnimportantViews Call the Uiautomator function setCompressedLayoutHierarchy() . Because the accessibility command performs faster when some elements are ignored, this keyword can speed up the test execution. Ignored elements will not be found, so this keyword is also implemented as a * setting (settings) * that can be changed at any time. Default valuefalse trueOrfalse
iOS-specific
Key Words Description Example
calendarFormat (sim-only) to set the calendar format for the iOS simulator such as gregorian (Gregorian)
bundleId Bundle ID of the application being tested. Used to launch tests in real-world devices, and also to launch tests with other keywords that require bundle IDs. When you perform a test on a real device using the bundle ID, you can not provide app the keyword, but you must provide it udid . Such asio.appium.TestApp
udid Unique device number of the connected real device (unique devices identifier) Such as1ae203187fc012g
launchTimeout In milliseconds, set a time to wait for instruments before the Appium run fails Like what:20000
locationServicesEnabled (sim-only) forces the location service to be turned on or off. The default value is to keep the current emulator set trueOrfalse
locationServicesAuthorized (sim-only) to avoid a warning of location services by modifying the Plist file setting to allow apps to use location services. The default value is to keep the current emulator set. Note that when you use this keyword, you also need to use the keyword bundleId to send the bundle ID of your app. trueOrfalse
autoAcceptAlerts Automatically select accept when an IOS personal information access warning (such as location, contact, picture) appears. The default value false . trueOrfalse
autoDismissAlerts When an IOS personal information access warning (such as location, contact, picture) appears, automatic selection is not accepted (Dismiss). The default value false . trueOrfalse
nativeInstrumentsLib Use native intruments libraries (that is, close instruments-without-delay) trueOrfalse
nativeWebTap (sim-only) allows "real", non-JavaScript-based Web click (tap) in Safari. Default value: false . Note: Depending on the viewport size/scale, the Click action does not necessarily pinpoint the corresponding element in the location. trueOrfalse
safariInitialUrl (sim-only) (>= 8.1) The address to use when initializing Safari. The default is a local welcome page Such ashttps://www.github.com
safariAllowPopups (Sim-only) allows JavaScript to create new windows in Safari. The default is to keep the emulator current settings. trueOrfalse
safariIgnoreFraudWarning (sim-only) prevents Safari from displaying a warning that this site may be at risk. The browser's current settings are maintained by default. trueOrfalse
safariOpenLinksInBackground (sim-only) Whether Safari allows links to open in a new window. The browser's current settings are maintained by default. trueOrfalse
keepKeyChains (sim-only) Whether to keep the password store record (keychains) when Appium session starts/ends (library/keychain (keychains)) trueOrfalse
localizableStringsDir Where to find the localized string. Default valueen.lproj en.lproj
processArguments Parameters passed to the AUT via instruments Such as-myflag
interKeyDelay In milliseconds, the delay between each key is pressed. Such as100
showIOSLog Whether the log of the device is displayed in the Appium log. Default valuefalse trueOrfalse
sendKeyStrategy Enter a text-to-text box policy. Simulator Default value: oneByOne (one after the other). Real Device defaults: grouped (grouped input) oneByOne, grouped orsetValue
screenshotWaitTimeout The maximum wait time in seconds for the screen to be generated. Default value: 10. Such as5
waitForAppScript The IOS automation script code that determines whether the app is started. By default, the system waits until the page content is not empty. The result must be a Boolean type. For example, true; target.elements().length > 0;$.delay(5000); true;

Appium--desired_capabilities detailed

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.