2016-03-04 90 views
0

我改变了我的配置,尝试一次运行两个appium会话,这样我就可以检查并在并行端口上运行自动化。不知何故,我打破了监管官的AVD启动。我试图恢复一切,killall会话,停止appium的所有命令行实例,但问题仍然存在。Appium不会启动

完整的错误信息:

error: Failed to start an Appium session, err was: Error: You must pass in either the 'app' or 'browserName' cap

info: [debug] Error: You must pass in either the 'app' or 'browserName' cap at e (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/server/capabilities.js:171:34) at [object Object].Capabilities.checkStrictValidity (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/server/capabilities.js:188:12) at [object Object].Capabilities.checkValidity (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/server/capabilities.js:140:10) at [object Object].Appium.configure (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/appium.js:238:35) at [object Object]. (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/appium.js:118:10) at [object Object].Appium.start (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/appium.js:129:5) at exports.createSession (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/server/controller.js:188:16) at Layer.handle [as handle_request] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/layer.js:82:5) at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:110:13) at Route.dispatch (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:91:3) at Layer.handle [as handle_request] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/layer.js:82:5) at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:267:22 at Function.proto.process_params (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:321:12) at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:261:10) at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:100:14) at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14) at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14) at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14) at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14) at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14) at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14) at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14) at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14) at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14) at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14) at /Applications/Appium.app/Contents/Resources/node_modules/appium/lib/server/controller.js:39:7 at Layer.handle [as handle_request] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/layer.js:82:5) at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:110:13) at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14) at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14) at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:10 4:14) at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14) at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14) at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14) at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14) at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14) at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14) at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14) at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14) at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14) at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14) at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14) at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14) at Route.dispatch (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:91:3) at Layer.handle [as handle_request] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/layer.js:82:5) at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:267:22 at Function.proto.process_params (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:321:12) at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:261:10) at methodOverride (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/method-override/index.js:79:5) at Layer.handle [as handle_request] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/layer.js:82:5) at trim_prefix (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:302:13) at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:270:7 info: [debug] Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: You must pass in either the 'app' or 'browserName' cap)","origValue":"You must pass in either the 'app' or 'browserName' cap"},"sessionId":null} info: <-- POST /wd/hub/session 500 5.350 ms - 230

info: --> GET /wd/hub/status {}

info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.4.13","revision":"c75d8adcb66a75818a542fe1891a34260c21f76a"}}} info: <-- GET /wd/hub/status 200 0.664 ms - 105 {"status":0,"value":{"build":{"version":"1.4.13","revision":"c75d8adcb66a75818a542fe1891a34260c21f76a"}}}

警报screeshot: enter image description here

设置:

enter image description here

enter image description here

enter image description here

如果需要更多信息,请让我知道。谢谢。

+0

hm错误是一个缺失的应用程序/浏览器名称,但我看到你有应用程序集。不过,我也看到你没有设置所需的deviceName。尝试设置,让我知道会发生什么。 – econoMichael

+0

我接下来看看它是否可以解决问题。添加它备份并获得相同的错误。 –

+0

appium是否可以访问您提到的appPath。 –

回答

0

请检查(打勾)以下选项:

Android Settings -> Basic -> Package [possible cause of failure] 
Android Settings -> Advanced -> SDK 

顺便说一句,这将是刚刚在你想要使用的UI功能(可能使用Appium检查独立)来运行你的应用程序的情况下,否则,如果您正在使用一些client来设置capabilities,很高兴看到您的设置的代码建议任何所需的更改。

0

缺少应用程序包和活动名称。需要将包和活动名称添加到期望的功能