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,我们的系统对安全性又有较高要求,所以,为了 ...
随机推荐
- C#异步编程之基于任务的异步模式
http://www.cnblogs.com/afei-24/p/6757361.html该文讲了基于任务的编程,这里再详细介绍一下.一.延续任务 private async static void ...
- java获取缓存通用类
1 class JedisHelper { public static <T, R> T getBySecond(String cacheKey, int seconds, R p, Fu ...
- [转] Akka实战:构建REST风格的微服务
[From] http://www.yangbajing.me/2015/11/27/akka%E5%AE%9E%E6%88%98%EF%BC%9A%E6%9E%84%E5%BB%BArest%E9% ...
- cmd命令行编译c/c++程序
一.打开文件夹(文件夹名字为123,文件夹里面有程序345.cpp) cd 123 二.在cmd里面编译程序 1.cd Desktop //在打开文件夹之前不回到桌面会出错 2.cd 123 ...
- centos 7 ssh登录安全问题
2018-10-11 1.ssh禁止root远程登录 修改ssh配置文件/etc/ssh/sshd_config vim /etc/ssh/sshd_config PermitRootLogin ye ...
- Html练习 | 小影志首页练习
<!DOCTYPE html> <head> <title>小影志首页练习</title> <style> /*应用全页字体*/ .pg-f ...
- 日志logback
http://tengj.top/2017/04/05/springboot7/ ------------------ logback使用指南. 公司配置 <?xml version=" ...
- nyoj 364——田忌赛马——————【贪心】
田忌赛马 时间限制:3000 ms | 内存限制:65535 KB 难度:3 描述 Here is a famous story in Chinese history. "That ...
- 【Linux】Linux系统启动过程
1.Linux系统的启动过程并不是大家想象中的那么复杂,其过程可以分为5个阶段: 内核的引导. 运行 init. 系统初始化. 建立终端 . 用户登录系统. 1.Linux系统的启动过程并不是大家想象 ...
- 【Linux】time+dd测试硬盘读写速度
dd 是 Linux/UNIX 下的一个非常有用的命令,作用是用指定大小的块拷贝一个文件,并在拷贝的同时进行指定的转换. dd 命令通用语法格式如下: dd if=path/to/input_file ...