Sobes.tech
Middle

What is Desired Capabilities in Appium?

sobes.tech AI

Answer from AI

Desired Capabilities in Appium are a set of parameters that define the settings and properties of a mobile automation session. They inform the Appium server about which platform, device, application, and other parameters to use for starting the test.

Examples of Desired Capabilities parameters:

  • platformName — the name of the platform (e.g., "Android" or "iOS")
  • deviceName — the name or identifier of the device
  • app — the path to the application or its identifier
  • automationName — the automation engine used (e.g., "UiAutomator2" for Android)

Example in JavaScript using WebDriverIO:

const caps = {
  platformName: 'Android',
  deviceName: 'emulator-5554',
  app: '/path/to/app.apk',
  automationName: 'UiAutomator2'
};

const driver = await remote({
  path: '/wd/hub',
  port: 4723,
  capabilities: caps
});

Thus, Desired Capabilities allow configuring the testing environment for a specific device and application.

What is Desired Capabilities in Appium? — QA / QA… - sobes.tech