Desired capabilities

Desired capabilities is a JSON object (a set of keys and values) sent by the client to the server. It describes the capabilities for the automation session in which we are interested.

Let's discuss the capabilities one by one; first, we will see the Appium server's capabilities:

We need to import "import org.openqa.Selenium.remote.DesiredCapabilities" library for Java to work with the desired capabilities.

Capability

Explanation

automationName

This capability is used to define the automation engine. If you want to work with an Android SDK version less than 17, then you need to define the value as Selendroid; otherwise, the capability takes the default value as Appium. Let's see how we can implement it practically:

DesiredCapabilities ...

Get Appium Essentials now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.