Appium server arguments

November 24, 2017 ยท View on GitHub

Many Appium 1.5 server arguments have been deprecated in favor of the --default-capabilities flag.

Usage: node . [flags]

Server flags

All flags are optional, but some are required in conjunction with certain others.

<expand_table>

FlagDefaultDescriptionExample
--shellnullEnter REPL mode
--ipanull(IOS-only) abs path to compiled .ipa file--ipa /abs/path/to/my.ipa
-a, --address0.0.0.0IP Address to listen on--address 0.0.0.0
-p, --port4723port to listen on--port 4723
-ca, --callback-addressnullcallback IP Address (default: same as --address)--callback-address 127.0.0.1
-cp, --callback-portnullcallback port (default: same as port)--callback-port 4723
-bp, --bootstrap-port4724(Android-only) port to use on device to talk to Appium--bootstrap-port 4724
-r, --backend-retries3(iOS-only) How many times to retry launching Instruments before saying it crashed or timed out--backend-retries 3
--session-overridefalseEnables session override (clobbering)
-l, --pre-launchfalsePre-launch the application before allowing the first session (Requires --app and, for Android, --app-pkg and --app-activity)
-g, --lognullAlso send log output to this file--log /path/to/appium.log
--log-leveldebuglog level; default (console[:file]): debug[:debug]--log-level debug
--log-timestampfalseShow timestamps in console output
--local-timezonefalseUse local timezone for timestamps
--log-no-colorsfalseDo not use colors in console output
-G, --webhooknullAlso send log output to this HTTP listener--webhook localhost:9876
--safarifalse(IOS-Only) Use the safari app
--default-device, -ddfalse(IOS-Simulator-only) use the default simulator that instruments launches on its own
--force-iphonefalse(IOS-only) Use the iPhone Simulator no matter what the app wants
--force-ipadfalse(IOS-only) Use the iPad Simulator no matter what the app wants
--tracetemplatenull(IOS-only) .tracetemplate file to use with Instruments--tracetemplate /Users/me/Automation.tracetemplate
--instrumentsnull(IOS-only) path to instruments binary--instruments /path/to/instruments
--nodeconfignullConfiguration JSON file to register appium with selenium grid--nodeconfig /abs/path/to/nodeconfig.json
-ra, --robot-address0.0.0.0IP Address of robot--robot-address 0.0.0.0
-rp, --robot-port-1port for robot--robot-port 4242
--selendroid-port8080Local port used for communication with Selendroid--selendroid-port 8080
--chromedriver-port9515Port upon which ChromeDriver will run--chromedriver-port 9515
--chromedriver-executablenullChromeDriver executable full path
--show-configfalseShow info about the appium server configuration and exit
--no-perms-checkfalseBypass Appium's checks to ensure we can read/write necessary files
--strict-capsfalseCause sessions to fail if desired caps are sent in that Appium does not recognize as valid for the selected device
--isolate-sim-devicefalseXcode 6 has a bug on some platforms where a certain simulator can only be launched without error if all other simulator devices are first deleted. This option causes Appium to delete all devices other than the one being used by Appium. Note that this is a permanent deletion, and you are responsible for using simctl or xcode to manage the categories of devices used with Appium.
--tmpnullAbsolute path to directory Appium can use to manage temporary files, like built-in iOS apps it needs to move around. On *nix/Mac defaults to /tmp, on Windows defaults to C:\Windows\Temp
--trace-dirnullAbsolute path to directory Appium use to save ios instruments traces, defaults to /appium-instruments
--debug-log-spacingfalseAdd exaggerated spacing in logs to help with visual inspection
--suppress-adb-kill-serverfalse(Android-only) If set, prevents Appium from killing the adb server instance
--async-tracefalseAdd long stack traces to log entries. Recommended for debugging only.
--webkit-debug-proxy-port27753(IOS-only) Local port used for communication with ios-webkit-debug-proxy--webkit-debug-proxy-port 27753
-dc, --default-capabilities{}Set the default desired capabilities, which will be set on each session unless overridden by received capabilities.`--default-capabilities [ '{"app": "myapp.app", "deviceName": "iPhone Simulator"}'
--rebootfalse- (Android-only) reboot emulator after each session and kill it at the end
--command-timeout60[DEPRECATED] No effect. This used to be the default command timeout for the server to use for all sessions (in seconds and should be less than 2147483). Use newCommandTimeout cap instead
-k, --keep-artifactsfalse[DEPRECATED] - no effect, trace is now in tmp dir by default and is cleared before each run. Please also refer to the --trace-dir flag.
--platform-namenull[DEPRECATED] - Name of the mobile platform: iOS, Android, or FirefoxOS--platform-name iOS
--platform-versionnull[DEPRECATED] - Version of the mobile platform--platform-version 7.1
--automation-namenull[DEPRECATED] - Name of the automation tool: Appium or Selendroid--automation-name Appium
--device-namenull[DEPRECATED] - Name of the mobile device to use--device-name iPhone Retina (4-inch), Android Emulator
--browser-namenull[DEPRECATED] - Name of the mobile browser: Safari or Chrome--browser-name Safari
--appnull[DEPRECATED] - IOS: abs path to simulator-compiled .app file or the bundle_id of the desired target on device; Android: abs path to .apk file--app /abs/path/to/my.app
-lt, --launch-timeout90000[DEPRECATED] - (iOS-only) how long in ms to wait for Instruments to launch
--languagenull[DEPRECATED] - Language for the iOS simulator / Android Emulator--language en
--localenull[DEPRECATED] - Locale for the iOS simulator / Android Emulator--locale en_US
-U, --udidnull[DEPRECATED] - Unique device identifier of the connected physical device--udid 1adsf-sdfas-asdf-123sdf
--orientationnull[DEPRECATED] - (IOS-only) use LANDSCAPE or PORTRAIT to initialize all requests to this orientation--orientation LANDSCAPE
--no-resetfalse[DEPRECATED] - Do not reset app state between sessions (IOS: do not delete app plist files; Android: do not uninstall app before new session)
--full-resetfalse[DEPRECATED] - (iOS) Delete the entire simulator folder. (Android) Reset app state by uninstalling app instead of clearing app data. On Android, this will also remove the app after the session is complete.
--app-pkgnull[DEPRECATED] - (Android-only) Java package of the Android app you want to run (e.g., com.example.android.myApp)--app-pkg com.example.android.myApp
--app-activitynull[DEPRECATED] - (Android-only) Activity name for the Android activity you want to launch from your package (e.g., MainActivity)--app-activity MainActivity
--app-wait-packagefalse[DEPRECATED] - (Android-only) Package name for the Android activity you want to wait for (e.g., com.example.android.myApp)--app-wait-package com.example.android.myApp
--app-wait-activityfalse[DEPRECATED] - (Android-only) Activity name for the Android activity you want to wait for (e.g., SplashActivity)--app-wait-activity SplashActivity
--device-ready-timeout5[DEPRECATED] - (Android-only) Timeout in seconds while waiting for device to become ready--device-ready-timeout 5
--android-coveragefalse[DEPRECATED] - (Android-only) Fully qualified instrumentation class. Passed to -w in adb shell am instrument -e coverage true -w--android-coverage com.my.Pkg/com.my.Pkg.instrumentation.MyInstrumentation
--avdnull[DEPRECATED] - (Android-only) Name of the avd to launch--avd @default
--avd-argsnull[DEPRECATED] - (Android-only) Additional emulator arguments to launch the avd--avd-args -no-snapshot-load
--use-keystorefalse[DEPRECATED] - (Android-only) When set the keystore will be used to sign apks.
--keystore-path<user>/.android/debug.keystore[DEPRECATED] - (Android-only) Path to keystore
--keystore-passwordandroid[DEPRECATED] - (Android-only) Password to keystore
--key-aliasandroiddebugkey[DEPRECATED] - (Android-only) Key alias
--key-passwordandroid[DEPRECATED] - (Android-only) Key password
--intent-actionandroid.intent.action.MAIN[DEPRECATED] - (Android-only) Intent action which will be used to start activity--intent-action android.intent.action.MAIN
--intent-categoryandroid.intent.category.LAUNCHER[DEPRECATED] - (Android-only) Intent category which will be used to start activity--intent-category android.intent.category.APP_CONTACTS
--intent-flags0x10200000[DEPRECATED] - (Android-only) Flags that will be used to start activity--intent-flags 0x10200000
--intent-argsnull[DEPRECATED] - (Android-only) Additional intent arguments that will be used to start activity--intent-args 0x10200000
--dont-stop-app-on-resetfalse[DEPRECATED] - (Android-only) When included, refrains from stopping the app before restart
--calendar-formatnull[DEPRECATED] - (IOS-only) calendar format for the iOS simulator--calendar-format gregorian
--native-instruments-libfalse[DEPRECATED] - (IOS-only) IOS has a weird built-in unavoidable delay. We patch this in appium. If you do not want it patched, pass in this flag.
--keep-keychainsfalse[DEPRECATED] - (iOS-only) Whether to keep keychains (Library/Keychains) when reset app between sessions
--localizable-strings-diren.lproj[DEPRECATED] - (IOS-only) the relative path of the dir where Localizable.strings file resides--localizable-strings-dir en.lproj
--show-ios-logfalse[DEPRECATED] - (IOS-only) if set, the iOS system log will be written to the console
--enable-heapdumpfalseEnables NodeJS memory dumps collection feature. This feature is extremely useful for finding memory leaks. Use the 'kill -SIGUSR2 <PID>' command to create a dump of memory heap for node process with the particular PID (this works for *nix systems only). The dump file will be created in the same folder, where main Appium script was executed and will have *.heapsnapshot extension. These snapshot can be then loaded to Chrome Inspector for further investigation. Read the Rising Stack article for more details.