Site Loader
Auckland, New Zealand
In this post we will start our discussion on Appium Session and Appium desired capabilities

Appium sessions

In Appium all the commands (client commands) are executed in the context of a session. Clients initiate a session with a server in ways specific to each library, but they all end up sending a POST /session request to the server, with a JSON object called the desired capabilities object. At this point the server will start up the automation session and respond with a session ID which is used for sending further commands. Here is the complete video of the below discussion

Appium Desired capabilities?

Desired Capabilities are sent by the Client to Server via JSON Objects by requesting the automation session we need. These desired capabilities are found in the link below http://appium.io/slate/en/v1.2.0/?java#appium-server-capabilities

Appium server Capability

Some of the Appium Server Capability are listed below
automationName Which automation engine to use Appium (default) or Selendroid
platformName Which mobile OS platform to use iOS, Android, or FirefoxOS
platformVersion Mobile OS version e.g., 7.1, 4.4
deviceName The kind of mobile device or emulator to use iPhone Simulator, iPad Simulator, iPhone Retina 4-inch, Android Emulator, Galaxy S4, etc…
 

Android only capability

appActivity Activity name for the Android activity you want to launch from your package MainActivity, .Settings
appPackage Java package of the Android app you want to run com.example.android.myApp, com.android.settings
appWaitActivity Activity name for the Android activity you want to wait for SplashActivity
appWaitPackage Java package of the Android app you want to wait for com.example.android.myApp, com.android.settings
deviceReadyTimeout Timeout in seconds while waiting for device to become ready 5
androidCoverage Fully qualified instrumentation class. Passed to -w in adb shell am instrument -e coverage true -w com.my.Pkg/com.my.Pkg.instrumentation.MyInstrumentation
enablePerformanceLogging (Chrome and webview only) Enable Chromedriver’s performance logging (default false) true, false
androidDeviceReadyTimeout Timeout in seconds used to wait for a device to become ready after booting e.g., 30
androidDeviceSocket Devtools socket name. Needed only when tested app is a Chromium embedding browser. The socket is open by the browser and Chromedriver connects to it as a devtools client. e.g., chrome_devtools_remote
Thanks for reading the post and watching the video !!! Please leave your comments and let me know if there is anything I should update in this post. Thanks, Karthik KK

Post Author: Karthik kk

3 Replies to “Understanding Appium Desired Capabilities and Session”

  1. Hi,

    I wanted to implement Appium like POM but every time i get nullpointer exception.
    Can you please share some demo or running framwork.
    It will be a career booster for me

  2. Hi,

    Can we automate testing of web application running on chrome on windows 10 using Appium?
    Most samples on internet are around testing applications on android/ mobile devices.

Leave a Reply

Your email address will not be published. Required fields are marked *