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. jquery中 $.expr使用实例介绍

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

  2. 微信小程序的calc不生效处理

    大致文字初略的记录描述一下问题:外层是relative相对定位,内部一个view 需要绝对定位bottom的值为128rpx,同时还要兼容适配苹果x的底部,所以值是这样设置的: bottom: cal ...

  3. (模板)poj3461(kmp模板题)

    题目链接:https://vjudge.net/problem/POJ-3461 题意:给出主串和模式串,求出模式串在主串中出现的次数. 思路:kmp板子题. AC代码: #include<cs ...

  4. Kubernetes组件-CronJob(定时任务)

    ⒈简介: Kubernetes的Job资源在创建时会立即运行pod.但是许多批处理任务需要在特定的时间运行,或者在指定的时间间隔内重复运行.在Linux和类UNIX操作系统中,这些任务通常被称为cro ...

  5. 数据结构 -- 队列Queue

    一.队列简介 定义 队列(queue)在计算机科学中,是一种先进先出的线性表. 它只允许在表的前端进行删除操作,而在表的后端进行插入操作.进行插入操作的端称为队尾,进行删除操作的端称为队头.队列中没有 ...

  6. oracle用户解锁,rename管理

    ---查看命令:用户默认表空间 SYS@ACE >select username,default_tablespace,temporary_tablespace,created from dba ...

  7. HTTP协议探究(四):TCP和TLS优化

    一 复习与目标 1 复习 简单密码学.对称加密与非对称加密 数字签名.数字证书 SSL/TLS HTTPS = HTTP + SSL/TLS,SSL/TLS为HTTP提供了保密性.完整性和鉴别性 2 ...

  8. React-脚手架

    1. Node和NPM 版本 2. 脚手架 在对React比较熟悉之前,为了避免陷入到开发工具的繁琐配置中,借助react官方提供的脚手架工具Create React App来搭建React应用 np ...

  9. windows phone 下拉刷新

    在windows phone 中采用数据列表时为了保证用户体验常遇到加载数据的问题.这个问题普遍到只要你用到数据列表就要早晚面对这个问题. 很多人会说这个问题已经有解决方案. 其实真正问题并不在于如何 ...

  10. OneinStack – 一键PHP/JAVA安装工具

    https://oneinstack.com/ OneinStack包含以下组合:lnmp(Linux + Nginx+ MySQL+ PHP) lamp(Linux + Apache+ MySQL+ ...