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. JavaSE基础(十二)--Java 对象和类

    Java 对象和类 Java作为一种面向对象语言.支持以下基本概念: 多态 继承 封装 抽象 类 对象 实例 方法 重载 本节我们重点研究对象和类的概念. 对象:对象是类的一个实例(对象不是找个女朋友 ...

  2. [Cometoj#3 C]子序列子序列子序列..._动态规划_数论

    子序列子序列子序列... 题目链接:https://cometoj.com/contest/38/problem/C?problem_id=1542 数据范围:略. 题解: 神仙题,感觉这个题比$D$ ...

  3. JavaWeb开发常用的前端控件

    罗列的下述控件大多依赖jquery插件,故可提前导入jquery插件以免出错 Validform 提供对表单的验证.提交等功能,具体可查阅其官方文档>>>Validform 示例如下 ...

  4. centos6.5安装python3及virtualenv环境

    1. 下载源码: wget https://www.python.org/ftp/python/3.6.0/Python-3.6.0.tgz wget http://mirrors.sohu.com/ ...

  5. 利用css 画各种三角形

      #triangle-up {    width: 0;    height: 0;    border-left: 50px solid transparent;    border-right: ...

  6. System memory 259522560 must be at least 4.718592

    [学习笔记] /*没有下面的话, 会报一个错误,java.lang.IllegalArgumentException: System memory 259522560 must be at least ...

  7. (二)mybatis框架原理(图解)

    目录 mybatis 框架原理图(粗略版) mybatis 框架原理图(粗略版)

  8. python3.5+installer 将.py 打包成.exe

    (1)下载安装installer,不如我安装在D:\Program Files\Python35,安装完成后,在D:\Program Files\Python35\Scripts可以找到install ...

  9. MySQL SELECT语法(四)UNION语法详解

    源自MySQL 5.7 官方手册:13.2.9.3 UNION Syntax 一.UNION语法 UNION用于将多个SELECT语句的结果合并到一个结果集中. SELECT ... UNION [A ...

  10. Java多线程(十一):线程组

    线程组 线程组可以批量管理线程和线程组对象. 一级关联 例子如下,建立一级关联. public class MyThread43 implements Runnable{ public void ru ...