Appium无法启动

时间:2016-03-04 18:41:04

标签: android appium

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

完整的错误消息:

  

错误:无法启动Appium会话,错误是:错误:您必须   通过“应用程序”和“应用程序”。或者' browserName'帽

     

info:[debug]错误:您必须传入'应用程序'要么   ' browserName'帽       在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)       在[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)       在exports.createSession(/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/server/controller.js:188:16)       在Layer.handle [as handle_request](/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/layer.js:82:5)       在下一个(/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:110:13)       在Route.dispatch(/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:91:3)       在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       在Function.proto.process_params(/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:321:12)       在下一个(/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:261:10)       在下一个(/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:100:14)       在下一个(/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)       在下一个(/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)       在下一个(/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)       在下一个(/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)       在下一个(/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)       在下一个(/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)       在下一个(/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)       在下一个(/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)       在下一个(/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)       在下一个(/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       在Layer.handle [as handle_request](/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/layer.js:82:5)       在下一个(/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:110:13)       在下一个(/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)       在下一个(/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)       在下一个(/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:10   4:14)       在下一个(/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)       在下一个(/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)       在下一个(/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)       在下一个(/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)       在下一个(/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)       在下一个(/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)       在下一个(/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)       在下一个(/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)       在下一个(/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)       在下一个(/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)       在下一个(/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)       在下一个(/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)       在Route.dispatch(/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:91:3)       在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       在Function.proto.process_params(/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:321:12)       在下一个(/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)       在Layer.handle [as handle_request](/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/layer.js:82:5)       在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]响应客户端错误:   {" status":33," value":{" message":"无法创建新会话。   (原始错误:您必须传入' app'或#39; browserName'   cap)"," origValue":"你必须传入'应用程序'或者' browserName'   cap"}," sessionId":null} info:< - POST / wd / hub / session 500 5.350 ms -   230

     

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

     

info:[debug]成功响应客户端:   {"状态":0,"值" {"建立" {"版本":" 1.4.13&#34 ;,"修订":" c75d8adcb66a75818a542fe1891a34260c21f76a"}}}   info:< - GET / wd / hub / status 200 0.664 ms - 105   {"状态":0,"值" {"建立" {"版本":" 1.4.13&#34 ;,"修订":" c75d8adcb66a75818a542fe1891a34260c21f76a"}}}

警告: enter image description here

设置:

enter image description here

enter image description here

enter image description here

如果需要更多信息,请与我们联系。谢谢。

3 个答案:

答案 0 :(得分:0)

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

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

顺便说一下,如果您想使用UI功能运行应用程序(可能使用Appium检查程序独立),否则如果您使用某些client来设置capabilities它很高兴看到您的设置代码建议任何必要的更改。

答案 1 :(得分:0)

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

答案 2 :(得分:0)

将您的appium桌面更新为最新版本。目前我正在使用1.8.1版本。

步骤:

  1. 启动appium桌面
  2. 单击“高级”选项卡
  3. 输入服务器地址= 127.0.0.1,端口= 4723,选中允许会话覆盖复选框
  4. 单击“启动服务器”按钮。它将启动appium服务器
  5. 点击appium桌面应用右上角的眼镜图标。将出现一个新窗口。
  6. 在出现的窗口中,您将看到所需的功能菜单。您需要插入以下参数。

    • deviceName
    • platformName
    • appPackage
    • appActivity

Appium desktop desired capabilites

  1. 单击开始会话按钮
  

确保将设备连接至计算机,并在设备中启用了USB调试功能。