Using –default-capabilities flag

Go back to tutorial

Using –default-capabilities flag

It has been seen that Appium 1.5 does away with most CLI flags that existed previously, further the remainder can be converted into JSON and made part of the –default-capabilities flag. Let us illustrate this with the helps of an example –

# raw JSON as an argument

–default-capabilities ‘{“app”: “myapp.app”, “deviceName”: “iPhone Simulator”}’

# or the name of a JSON file

–default-capabilities /path/to/file.json

Moreover, windows users will need to escape the quotes in JSON passed on the command line including :

–default-capabilities “{\”app\”: \”myapp.app\”}”

--default-capabilities flag

Table illustrating Default Capability Flag ad respective JSON Key

Flag JSON key
–keep-artifacts keepArtifacts
–platform-name platformName
–platform-version platformVersion
–automation-name automationName
–device-name deviceName
–browser-name browserName
–app app
–launch-timeout launchTimeout
–language language
–locale locale
–udid udid
–orientation orientation
–no-reset noReset
–full-reset fullReset
–app-pkg appPackage
–app-activity appActivity
–app-wait-package appWaitPackage
–app-wait-activity appWaitActivity
–device-ready-timeout deviceReadyTimeout
–android-coverage androidCoverage
–avd avd
–avd-args avdArgs
–use-keystore useKeystore
–keystore-path keystorePath
–keystore-password keystorePassword
–key-alias keyAlias
–key-password keyPassword
–intent-action intentAction
–intent-category intentCategory
–intent-flags intentFlags
–intent-args optionalIntentArguments
–dont-stop-app-on-reset dontStopAppOnReset
–calendar-format calendarFormat
–native-instruments-lib nativeInstrumentsLib
–keep-keychains keepKeyChains
–localizable-strings-dir localizableStringsDir
–show-ios-log showIOSLog
–reboot reboot

Enrich your profile and become Job Ready. Practice and Prepare for Mobile Testing (Appium) Exam Now!

Get expert advice and hundreds of Free Test – Try Mobile Testing (Appium) Practice Questions Now!

Go back to tutorial

Desired Capabilities
Appium Desktop

Get industry recognized certification – Contact us

keyboard_arrow_up
Open chat
Need help?
Hello 👋
Can we help you?