Appium Desired Capabilities Information configuration

Source: Internet
Author: User

To write Appium scripts, you must configure desired capabilities information

Desired capabilities must be provided at the start of the session.

Desired capabilities is essentially stored in the form of the key value dictionary, which the client sends to the server and tells the server how we want to test it. It tells Appium server something like:

    • Whether to start Andorid or start iOS.

    • What is the app's package when you start Android?

    • What is the activity of the app when you start Android?

Appium's desired capabilities basic configuration is as follows:

# Initialization Information
Desired_caps = {}
desired_caps["PlatformName"] = "Android"
desired_caps["platformversion"] = "7.0"
desired_caps["devicename"] = "HuaWeiP9"
desired_caps["apppackage"] = "app Package name"
desired_caps["appactivity"] = "Activitys Name of App"
# Support Input Chinese
desired_caps["Unicodekeyboard"] = "True"
desired_caps["Resetkeyboard"] = "True"

Configuration Description:
DeviceName: Which device is started, is it a real machine or an emulator? IPhone simulator,ipad simulator,iphone Retina 4-inch,android emulator,galaxy S4 ...
    • Automationname: What kind of automation engine is used. Appium (default) or Selendroid.

    • PlatformName: which mobile platform to use. IOS, Android, Orfirefoxos.

    • Platformversion: Specifies the system version of the platform. For example, the Android platform, version 5.1.

    • Appactivity: The activity name of the app to be tested. such as Mainactivity,. Settings. Note that the native app should add a "." Before the activity.

    • Apppackage: The Java package for the app to be tested. Like Com.example.android.myApp, Com.android.settings.

Appium Desired Capabilities Information configuration

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.