直接运行 appium 会提示 API level >= 17,在低于 17 的版本是不是不能使用 appium 了?selendroid 和 appium 是怎么互相兼容的?
低于 17 的不能用 appium,用 selendroid 吧
可以使用的 多加一个 caps automationName 为 Selendroid 这个默认是 appium
#3 楼 @felix 这是我的 desired,请帮忙看看哪里有问题?
var desired = {
platformName: 'Android',
platformVersion: '4.1',
deviceName: '3230df5662738061',
automationName: 'Selendroid',
'app': path.resolve(__dirname, '/Users/mingyu/work/apkFile/downloadfile.apk'),
'app-package': 'com.mxy.test', // built-in contact app
'app-activity': 'com.mxy.test.MainActivity'
};
#5 楼 @mingyuwang 是 1.0 么?1.0 的 app-package 和 app-activity 变了吧
desired_caps = {
'platformName': 'Android',
'platformVersion': '4.2',
'deviceName': 'Android Emulator',
'app': PATH('../../apps/' + app),
}
#6 楼 @felix 是 1.0 的,这个配置在跑 4.1 以上版本时时可以的。但是一旦使用 Selendroid 就报错。现在报的错误是:
info: Inserting selendroid manifest
error: uncaughtException: Arguments to path.resolve must be strings date=Mon May 26 2014 15:43:43 GMT+0800 (CST), pid=4145, uid=501, gid=20, cwd=/usr/local/lib/node_modules/appium, execPath=/usr/local/Cellar/node/0.10.28/bin/node, version=v0.10.28, argv=[node, /usr/local/bin/appium], rss=50905088, heapTotal=54108160, heapUsed=17594208, loadavg=[1.95166015625, 1.4951171875, 1.369140625], uptime=23392, trace=[column=15, file=path.js, function=Object.exports.resolve, line=313, method=exports.resolve, native=false, column=21, file=/usr/local/lib/node_modules/appium/lib/devices/android/selendroid.js, function=Selendroid.insertSelendroidManifest, line=332, method=insertSelendroidManifest, native=false, column=12, file=/usr/local/lib/node_modules/appium/lib/devices/android/selendroid.js, function=, line=103, method=null, native=false, column=21, file=/usr/local/lib/node_modules/appium/node_modules/async/lib/async.js, function=null, line=595, method=null, native=false, column=13, file=/usr/local/lib/node_modules/appium/node_modules/async/lib/async.js, function=null, line=235, method=null, native=false, column=13, file=/usr/local/lib/node_modules/appium/node_modules/async/lib/async.js, function=iterate, line=142, method=null, native=false, column=25, file=/usr/local/lib/node_modules/appium/node_modules/async/lib/async.js, function=null, line=153, method=null, native=false, column=17, file=/usr/local/lib/node_modules/appium/node_modules/async/lib/async.js, function=null, line=237, method=null, native=false, column=34, file=/usr/local/lib/node_modules/appium/node_modules/async/lib/async.js, function=null, line=600, method=null, native=false, column=9, file=/usr/local/lib/node_modules/appium/lib/devices/android/adb.js, function=null, line=1301, method=null, native=false], stack=[TypeError: Arguments to path.resolve must be strings, at Object.exports.resolve (path.js:313:15), at Selendroid.insertSelendroidManifest (/usr/local/lib/node_modules/appium/lib/devices/android/selendroid.js:332:21), at null. (/usr/local/lib/node_modules/appium/lib/devices/android/selendroid.js:103:12), at /usr/local/lib/node_modules/appium/node_modules/async/lib/async.js:595:21, at /usr/local/lib/node_modules/appium/node_modules/async/lib/async.js:235:13, at iterate (/usr/local/lib/node_modules/appium/node_modules/async/lib/async.js:142:13), at /usr/local/lib/node_modules/appium/node_modules/async/lib/async.js:153:25, at /usr/local/lib/node_modules/appium/node_modules/async/lib/async.js:237:17, at /usr/local/lib/node_modules/appium/node_modules/async/lib/async.js:600:34, at /usr/local/lib/node_modules/appium/lib/devices/android/adb.js:1301:9]
[1] + 4145 exit 1 appium
Arguments to path.resolve must be strings date 提示传递的参数错误,要求是字符串