Appium的DesiredCapabilities参数设置
Appium的DesiredCapabilities参数设置
DesiredCapabilities 负责启动服务端时的参数设置。实际使用时根据自己的需要,可自行修改一些参数。
比如,应用程序在查找某个页面的元素时,定位可能会时间超长。默认的命令间隔时间是60s,如果在60s内没有找到,就会自动退出。可以使用newCommandTimeout设置为更大的数值。
capabilities.setCapability("newCommandTimeout",240);
比如,最开始使用appium时,设置了上面的安装apk的路径,结果安装后调试程序发现接口无返回数据。后来定位问题是因为安装时进行了重签名。程序的保护机制让数据无返回了。可以使用noSign设置来避免重签名。
capabilities.setCapability("noSign","true");
当然,后来发现不在程序里写文件路径,而是提前安装好测试包,这样就避免了每次都要重新安装。
完整的Server参数
http://appium.io/slate/en/master/?ruby#appium-server-capabilities
**Server capabilities**
Capability Appium 、Selendroid
platformName 平台的名称:iOS, Android, or FirefoxOS
platformVersion 移动设备的系统版本号,7.1, 4.4
deviceName IOS:instruments -s devices,Android:随便写
app 安装文件路径:/abs/path/to/my.apk or http://myapp.com/app.ipa
browserName 测试的web浏览器,如果是测app则忽略
newCommandTimeout 等待新命令的最长时间,超时后退出。默认是60s
autoLaunch 是否自动安装和启动,默认true
language 模拟器的语言设置
locale 模拟器的地区设置
udid 设备号
orientation 模拟器的横竖屏设置
autoWebview Move directly into Webview context
noReset 在当前session前不重置app状态
fullReset ios删除文件夹,Android删除app数据。
**android only**
appActivity 要启动的Activity
appPackage 要启动的包
appWaitActivity 等待的Activity
appWaitPackage 等待的包
deviceReadyTimeout 等待设备就绪的时间
androidCoverage
enablePerformanceLogging (Chrome and webview only)default=false
androidDeviceReadyTimeout
androidDeviceSocket
avd
avdLaunchTimeout
avdReadyTimeout
avdArgs
useKeystore
keystorePath
keystorePassword
keyAlias
keyPassword
chromedriverExecutable
autoWebviewTimeout
intentAction
intentCategory
intentFlags
optionalIntentArguments
unicodeKeyboard
resetKeyboard
noSign Skip checking and signing,work only with UiAutomator and not with selendroid
ignoreUnimportantViews
**ios only**
calendarFormat
bundleId
udid
launchTimeout
locationServicesEnabled
locationServicesAuthorized
autoAcceptAlerts
nativeInstrumentsLib
nativeWebTap
safariAllowPopups
safariIgnoreFraudWarning
safariOpenLinksInBackground
keepKeyChains
localizableStringsDir
processArguments
interKeyDelay
showIOSLog
Appium的DesiredCapabilities参数设置的更多相关文章
- 移动端UI自动化Appium测试——DesiredCapabilities参数配置及含义
一.DesiredCapabilities的作用: 负责启动服务端时的参数设置,启动session的时候是必须提供的. Desired Capabilities本质上是key value的对象,它告诉 ...
- Appium 自动化测试(7) -- Appium 服务器初始化参数设置
Desired Capabilities Desired capabilities 是一些发送给 Appium 服务器的键值对集合 (比如 map 或 hash),告诉服务器我们想要启动什么类型的自动 ...
- DesiredCapabilities参数配置及含义
一.DesiredCapabilities的作用: 负责启动服务端时的参数设置,启动session的时候是必须提供的. Desired Capabilities本质上是key value的对象,它告诉 ...
- Android版DesiredCapabilities参数配置
前言 每一个App测试都应指定是在什么平台下,那个设备中运行那个App,而在Appium中主要是通过DesiredCapabilities来配置的. DesiredCapabilities的作用,负责 ...
- Appium 服务器初始化参数(Capability)
键 描述 值 automationName 自动化测试的引擎 Appium (默认)或者 Selendroid platformName 使用的手机操作系统 iOS, Android, 或者 Fire ...
- IOS版DesiredCapabilities参数配置
前言 相比较Android的DesiredCapabilities参数配置,IOS的相对而言比较复杂. 特别是在真机上跑的时候,参数就更加复杂. DesiredCapabilities参数配置 模拟器 ...
- Appium - 命令行参数
1.cmd端口输入,appium -help参考帮助信息 2.Appium - 命令行参数 参数 默认 描述 举个例子 --shell 空值 进入REPL模式 --ipa 空值 (仅限IOS)ab ...
- 手把手教从零开始在GitHub上使用Hexo搭建博客教程(二)-Hexo参数设置
前言 前文手把手教从零开始在GitHub上使用Hexo搭建博客教程(一)-附GitHub注册及配置介绍了github注册.git相关设置以及hexo基本操作. 本文主要介绍一下hexo的常用参数设置. ...
- jqGrid的autoencode参数设置为true在客户端可能引发的编码问题
不久前使用jqGrid+MVC做过一段时间开发. 一开始,分页参数几乎都是默认值,jqGrid的分页功能很好用. 考虑到each input is evil,我们的系统对安全性又有较高要求,所以,为了 ...
随机推荐
- Python- sort()/sorted()
Python list内置sort()方法用来排序,也可以用python内置的全局sorted()方法来对可迭代的序列排序生成新的序列. sorted(iterable,key=None,revers ...
- python-%操作符
1.打印字符串 print("His name is %s"%("Aviad")) His name is Aviad 2.打印整数print("He ...
- [转] JAVA从本机获取IP地址
[From] https://www.cnblogs.com/xiaoBlog2016/p/7076230.html 论述: 此篇博客是在工作的时候,需要获得当前网络下面正确的ip地址,在网上查阅很多 ...
- IE Error: '__doPostBack' is undefined 问题解决
突然遇到个很奇怪的BUG,翻页控件,其他浏览器一切正常,IE无法翻页,会提示 '__doPostBack' is undefined 后来搜索发现: [原文發表地址] Bug and Fix: ASP ...
- Ace教你一步一步做Android新闻客户端(四) 优化Bitmap大法
我计划着把需要用到的知识分解开来写,趁着我们要开发这款客户端的机会把安卓所有移动客户端开发中的技术贯穿其中,也是我自己成长的过程.By Ace in 20160121 我们开发一款新闻客户端程序,它的 ...
- URLEncoder.encode问题
遇到java里的URLEncoder.encode方法编码后与javascript的encodeURIComponent方法的结果有点不一样,找了一下资料,原来URLEncoder实现的是HTML形式 ...
- lua输入函数名字符串执行函数
str = "testA()"loadstring(str)() function testA() ------end 使用loadstring即可执行后面在xlua用了下发现不能 ...
- Java动态性 字节码操作
Java动态性的两种常见方式:-字节码操作 - 反射;字节码操作比反射开销小,性能高,JAVAasist性能高于反射,低于ASM 运行时操作字节码可是实现 : 动态生成新的类:动态的改变某个类的结构 ...
- http状态代码含义收藏
状态代码(也称作错误代码),指为服务器所接收每个请求(网页点击)分配的 3 位数代码.多数有效网页点击都有状态代码 200("正常")."网页未找到"错误会生产 ...
- Python Fabric ssh 配置解读
Python Fabric ssh 配置解读 Fabric 2.4简介: Fabric is a high level Python (2.7, 3.4+) library designed to e ...