Appium Server Arguments

Go back to tutorial

Appium Server Arguments

Before we begin to understand more the Appium Server Arguments, we must also know how to start an Appium Server. Generally, the desired capabilities are sent by the client to the server via JSON objects. This is done by requesting the automation session you intend to have. Further, the preceding code refactor, you can start the Appium server by calling the start() method. Moreover, this method is used to start the Appium server assuming the node and appium.js files to be in certain locations and using port 4723. But in case you have tweaked node.js installation, then your Appium install path will not be the same. Also, if you want to start Appium server on different ports, then you can use AppiumServiceBuilder to override these inputs.

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

Usage: node . [flags]

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

Flag  Description 
–shell Enter REPL mode
–allow-cors Turn on CORS compatibility mode, which will allow connections to the Appium server from within websites hosted on any domain. Be careful when enabling this feature, since there is a potential security risk if you visit a website that uses a cross-domain request to initiate or introspect sessions on your running Appium server.
–ipa (IOS-only) abs path to compiled .ipa file
-a, –address IP Address to listen on
-p, –port port to listen on
-ca, –callback-address callback IP Address (default: same as –address)
-cp, –callback-port callback port (default: same as port)
-bp, –bootstrap-port (Android-only) port to use on device to talk to Appium
-r, –backend-retries (iOS-only) How many times to retry launching Instruments before saying it crashed or timed out
–session-override Enables session override (clobbering)
-l, –pre-launch Pre-launch the application before allowing the first session (Requires –app and, for Android, –app-pkg and –app-activity)
-g, –log Also send log output to this file
–log-level Set the server log level for console and logfile (specified as console-level:logfile-level, with both being the same if only one value is supplied). Possible values are debug, info, warn, error, which are progressively less verbose.
–log-timestamp Show timestamps in console output
–local-timezone Use local timezone for timestamps
–log-no-colors Do not use colors in console output
-G, –webhook Also send log output to this HTTP listener
–safari (IOS-Only) Use the safari app
–default-device, -dd (IOS-Simulator-only) use the default simulator that instruments launches on its own
–force-iphone (IOS-only) Use the iPhone Simulator no matter what the app wants
–force-ipad (IOS-only) Use the iPad Simulator no matter what the app wants
–tracetemplate (IOS-only) .tracetemplate file to use with Instruments
–instruments (IOS-only) path to instruments binary
–nodeconfig Configuration JSON file to register appium with selenium grid
-ra, –robot-address IP Address of robot
-rp, –robot-port port for robot
–selendroid-port Local port used for communication with Selendroid
–chromedriver-port Port upon which ChromeDriver will run
–chromedriver-executable ChromeDriver executable full path
–show-config Show info about the appium server configuration and exit
–no-perms-check Bypass Appium’s checks to ensure we can read/write necessary files
–strict-caps Cause sessions to fail if desired caps are sent in that Appium does not recognize as valid for the selected device
–isolate-sim-device Xcode 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.
–tmp Absolute 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-dir Absolute path to directory Appium use to save ios instruments traces, defaults to /appium-instruments
–debug-log-spacing Add exaggerated spacing in logs to help with visual inspection
–suppress-adb-kill-server (Android-only) If set, prevents Appium from killing the adb server instance
–async-trace Add long stack traces to log entries. Recommended for debugging only.
–webkit-debug-proxy-port (IOS-only) Local port used for communication with ios-webkit-debug-proxy
-dc, –default-capabilities Set the default desired capabilities, which will be set on each session unless overridden by received capabilities.
–reboot – (Android-only) reboot emulator after each session and kill it at the end
–enable-heapdump Enables NodeJS memory dumps collection feature. This feature is extremely useful for finding memory leaks.
–relaxed-security Disable additional security checks, so it is possible to use some advanced features, provided by drivers supporting this option. Only enable it if all the clients are in the trusted network and it is not the case if a client could potentially break out of the session sandbox.

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

Get industry recognized certification – Contact us

Menu