Desired Capabilities are keys and values encoded in a JSON object, sent by Appium clients to the server when a new automation sessionis requested.

They tell the Appium drivers all kinds of important things abouthow you want your test to work.

Each Appium client builds capabilities in a wayspecific to the client's language, but at the end of the day, they are sent over to Appium as JSON objects.

There are many, many Capabilities that Appium supports.Capabilities also differ by driver, though there are a standard set that mostdrivers pay attention to.

What follows are a series of tables outlining thevarious Desired Capabilities available in general and for specific drivers.

===========================================================

General Capabilities

These Capabilities span multiple drivers.

automationName

Which  automation engine to use

Appium  (default) or Selendroid or UiAutomator2 or Espresso for Android or XCUITest  for iOS or YouiEngine for application built with You.i Engine

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.... On iOS, this should be one of the valid devices returned by  instruments with instruments -s devices. On Android this capability is  currently ignored, though it remains required.

app

The absolute  local path or remote http URL  to a .ipa file (IOS), .app folder (IOS Simulator), .apk file (Android) or  .apks file (Android App Bundle), or a .zip file containing one of these (for  .app, the .app folder must be the root of the zip file). Appium will attempt  to install this app binary on the appropriate device first. Note that this  capability is not required for Android if you specify appPackage and  appActivity capabilities (see below). Incompatible with browserName. See here  about .apks file.

/abs/path/to/my.apk  or http://myapp.com/app.ipa

browserName

Name of mobile  web browser to automate. Should be an empty string if automating an app  instead.

'Safari' for  iOS and 'Chrome', 'Chromium', or 'Browser' for Android

newCommandTimeout

How long (in  seconds) Appium will wait for a new command from the client before assuming  the client quit and ending the session

e.g. 60

language

Language to set  for iOS and Android. It is only available for simulator on iOS

e.g. fr

locale

Locale to set  for iOS and Android. It is only available for simulator on iOS. fr_CA format  for iOS. CA format (country name abbreviation) for Android

e.g. fr_CA, CA

udid

Unique device  identifier of the connected physical device

e.g. 1ae203187fc012g

orientation

(Sim/Emu-only)  start in a certain orientation

LANDSCAPE or  PORTRAIT

autoWebview

Move directly  into Webview context. Default false

true, false

noReset

Don't reset app  state before this session. See here  for more details

true, false

fullReset

Perform a  complete reset. See here  for more details

true, false

eventTimings

Enable or  disable the reporting of the timings for various Appium-internal events  (e.g., the start and end of each command, etc.). Defaults to false. To  enable, use true. The timings are then reported as events property on  response to querying the current session. See the event  timing docs for the the structure of this response.

e.g., true

enablePerformanceLogging

(Web and  webview only) Enable Chromedriver's (on Android) or Safari's (on iOS)  performance logging (default false)

true, false

printPageSourceOnFindFailure

When a find  operation fails, print the current page source. Defaults to false.

e.g., true

Appium Desired Capabilities-General Capabilities的更多相关文章

  1. Appium Desired Capabilities

    Appium Desired Capabilities Desired Capabilities 是由 keys 和 values 组成的 JSON 对象. 举个简单例子: { "platf ...

  2. Appium Desired Capabilities-iOS Only

    Appium Desired Capabilities-iOS Only These Capabilities are available only on the XCUITest Driver an ...

  3. Appium Desired Capabilities信息配置

    编写APPium脚本,必须要配置Desired Capabilities信息 Desired Capabilities 在启动 session 的时候是必须提供的. Desired Capabilit ...

  4. Appium自动化(4) - Appium Desired Capabilities 参数详解

    如果你还想从头学起Appium,可以看看这个系列的文章哦! https://www.cnblogs.com/poloyy/category/1693896.html Desired Capabilit ...

  5. Appium Desired Capabilities-Android Only

    Android Only These Capabilities are available only on Android-baseddrivers (like UiAutomator2for exa ...

  6. appium Capabilities的各个标签

    今天详解一下Capabilities的各个标签,以后如果用得着可以随时翻阅. General Capabilities 标签 概述 值 automationName 使用引擎 默认为Appium,其中 ...

  7. 五 Android Capabilities讲解

    1.Capabilities介绍 可以看下之前代码里面设置的capabilities DesiredCapabilities capabilities = new DesiredCapabilitie ...

  8. Capabilities & ChromeOptions

    https://sites.google.com/a/chromium.org/chromedriver/capabilities http://stackoverflow.com/questions ...

  9. 四 Android Capabilities讲解

    本文转自:http://www.cnblogs.com/sundalian/p/5629429.html Android Capabilities讲解   1.Capabilities介绍 可以看下之 ...

随机推荐

  1. sizeof与strcpy的区别

    转自:http://c.biancheng.net/view/342.html 表面上看strcpy和sizeof都是求字符串的长度,但是二者却存在着许多不同之处及本质区别 strlen是一个函数,用 ...

  2. ubuntu 右上角网络图标不见了

    sudo service network-manager stop sudo rm /var/lib/NetworkManager/NetworkManager.state sudo service ...

  3. Python学习笔记——文件系统

    文件系统 import os # 打印当前目录 print(os.getcwd()) # 列出当前目录的所有文件 print(os.listdir()) F:\codes\python\python\ ...

  4. VS.vs15

    1.20190615 安装的 vs2015(cn_visual_studio_enterprise_2015_with_update_3_x86_x64_dvd_8923298.iso) 的目录为: ...

  5. 最新 鹏博士java校招面经 (含整理过的面试题大全)

    从6月到10月,经过4个月努力和坚持,自己有幸拿到了网易雷火.京东.去哪儿.鹏博士等10家互联网公司的校招Offer,因为某些自身原因最终选择了鹏博士.6.7月主要是做系统复习.项目复盘.LeetCo ...

  6. thymeleaf如何遍历数据 each循环的使用

    首先在html开始标签中引入一个属性 xmlns:th="http://www.thymeleaf.org" 遍历数据示例 <tbody> <tr th:each ...

  7. MSSQL 获取数据库、表、字段信息语句

    --获取所有数据库名称 SELECT Name FROM Master..SysDatabases ORDER BY Name --获取库里所有表名 SELECT * FROM SysObjects ...

  8. dubbo分布式服务框架-study2

    本文开始对springboot+dubbo集成,使用的版本为springboot 2.0.0.dubbo 2.0.0,步骤如下: 1.添加依赖: <dependency> <grou ...

  9. 【AtCoder】Mujin Programming Challenge 2017

    Mujin Programming Challenge 2017 A - Robot Racing 如果每个数都是一个一个间隔开的,那么答案是\(n!\) 考虑把一个数挪到1,第二个数挪到3,以此类推 ...

  10. 2.5路由网关:Zuul

    在原有的工程上,创建一个新的工程 创建service-zuul工程 其pom.xml文件如下: <?xml version="1.0" encoding="UTF- ...