Appium Desired Capabilities-General Capabilities

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

原文地址:https://www.cnblogs.com/davieyang/p/10066911.html

时间: 2024-10-09 07:28:28

Appium Desired Capabilities-General Capabilities的相关文章

Appium Desired Capabilities

简介 Appium Desired Capabilities官方文档:http://appium.io/docs/en/writing-running-appium/caps/或者在gitHub上查看:https://github.com/appium/appium/blob/master/docs/cn/writing-running-appium/caps.mdDesired Capabilities是一组设置的键值对的集合,是对Appium会话进行配置,传达给服务器所需自动化的平台和应用程

Appium Desired Capabilities信息配置

编写APPium脚本,必须要配置Desired Capabilities信息 Desired Capabilities 在启动 session 的时候是必须提供的. Desired Capabilities 本质上是以 key value 字典的方式存放,客户端将这些键值对发给服务端,告诉服务端我们想要怎么测试.它告诉 appium Server这样一些事情: 是启动Andorid还是启动iOS. 启动Android时,app的package是什么. 启动Android时,app的activit

Appium Desired Capabilities-Android Only

Android Only These Capabilities are available only on Android-baseddrivers (like UiAutomator2for example). appActivity Activity name for the Android activity you  want to launch from your package. This often needs to be preceded by a .  (e.g., .MainA

四 Android Capabilities讲解

本文转自:http://www.cnblogs.com/sundalian/p/5629429.html Android Capabilities讲解 1.Capabilities介绍 可以看下之前代码里面设置的capabilities DesiredCapabilities capabilities = new DesiredCapabilities(); capabilities.setCapability("automationName", "Appium")

五 Android Capabilities讲解

1.Capabilities介绍 可以看下之前代码里面设置的capabilities DesiredCapabilities capabilities = new DesiredCapabilities(); capabilities.setCapability("automationName", "Appium"); capabilities.setCapability("platformName","Android");

使用java语言通过appium工具测试ios应用一些问题总结

问题一 1.3.7版本好像有一个bug,就是需要替换这个文件(下载地址:http://download.csdn.net/detail/u011496891/8677069)进入到apium的安装目录下 修改 node_modules/appium/node_modules/node-idevice文件,否则就出现下面这个错误了.这个bug不知道什么时候修复.. org.openqa.selenium.SessionNotCreatedException: A new session could

appium()-java-client-api

//appium java-client-api 介绍 原文地址:http://appium.github.io/java-client/index-all.html#_S_ A B C D E F G H I J K L M N O P Q R S T U V W Y Z A AccessibilityId(String) - Static method in class io.appium.java_client.MobileBy About Android accessibility ht

Appium+python自动化21-DesiredCapabilities详解【转载】

Appium Desired Capabilities Desired Capabilities 是由 keys 和 values 组成的 JSON 对象. 举个简单例子: { "platformName": "iOS", "platformVersion": "11.0", "deviceName": "iPhone 7", "automationName": &q

appium远程调用appium server

如何通过本地的代码,调用远程的server呢? 例如:我有两台电脑A(192.168.112.10)和B(192.168.112.11),那我怎么能在A执行本地脚本,但是使用B上的server呢? 查看appium连接appium服务并开启一个session的例子如下: desired_caps = {} desired_caps['platformName'] = 'Android' desired_caps['platformVersion'] = '4.4' desired_caps['d