Appium Python Three: desired capabilities

Source: Internet
Author: User
Tags appium

Brief introduction

Desired capabilities is a collection of some key-value pairs. Python uses a dictionary approach.

The client sends these key-value pairs to the server and tells the server how we want to test them. For example, we can set PlatformName's capability to Android, which is to tell the Appium server that we want an Android session instead of an IOS one.

Before we create a new driver, we will define the Desired_caps first.

APP desired_caps Definition

For example, the following code:

Desired_caps ={}desired_caps['PlatformName'] ='Android'desired_caps['platformversion'] ='4.2.2'desired_caps['devicename'] ='Android Emulator'desired_caps['Apppackage'] ='com.android.contacts'desired_caps['appactivity'] ='com.android.contacts.activities.PeopleActivity'

This is a typical way to test Android apps.

We use a dictionary to install key-value pairs. This defines the platform on which we want to run test cases, that is, Android. Defines the platform version, which is Android 4.2.2. Defines the app's package name and activity name.

The package and Activity are specified here, so you don't have to specify the app.

Desired capabilities Key value pair detailed description

Reference: Http://appium.io/slate/en/master/?python#appium-server-capabilities

Common desired capabilities Key-value pairs:

Android-specific desired capabilities key-value pairs:

Appium Python Three: desired capabilities

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.