首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >需要帮助:模拟器没有从Appium.app启动应用程序

需要帮助:模拟器没有从Appium.app启动应用程序
EN

Stack Overflow用户
提问于 2014-08-21 18:50:27
回答 2查看 8.3K关注 0票数 3

运行Appium应用程序自动化移动应用程序时遇到问题

下面是我使用的Appium版本:1.2.1Xcode: 5.1.1

以下是我正在做的步骤,

  1. 下载Appium.dmg
  2. 运行dmg文件,然后启动appium.app文件。
  3. 用Xcode构建7.1仿真器应用程序
  4. 在appium.app上,启用了‘App’选项,并提供了.app文件路径“/User/umairrashid/Library/Application Support/iPhone appium.app
  5. 在“一般设置”中,服务器地址: 127.0.0.1,端口: 4723
  6. 检查更新:已启用
  7. 新的命令超时:7200秒

当我点击‘启动’按钮,那么一切似乎都好。

当我单击“检查器”按钮,然后显示以下错误时,

无法发射Appium探长

无法启动新的会话

确保Appium服务器运行时使用Appium.app中的"App“参数(以及用于Android的包和活动)打开应用程序,或者连接selenium客户端并在所需的功能对象中提供该参数。

在Appium控制台,我发现了以下错误,

代码语言:javascript
复制
2014-08-21T17:57:57.789Z - info: --> POST /wd/hub/session {"desiredCapabilities":{"platformName":"iOS","platformVersion":"7.1","newCommandTimeout":"999999","automationName":"Appium"}}

2014-08-21T17:57:57.792Z - info: <-- POST /wd/hub/session 500 3.235 ms - 286 



2014-08-21T17:57:57.772Z - debug: Request received with params: {}

2014-08-21T17:57:57.772Z - debug: Responding to client with success: {"status":0,"value":{"build":{"version":"1.2.0","revision":"e53f49c706a25242e66d36685c268b599cc18da5"}}}

2014-08-21T17:57:57.775Z - debug: Appium request initiated at /wd/hub/sessions

2014-08-21T17:57:57.775Z - debug: Request received with params: {}

2014-08-21T17:57:57.775Z - debug: Responding to client with success: {"status":0,"value":[]}

2014-08-21T17:57:57.789Z - debug: Appium request initiated at /wd/hub/session

2014-08-21T17:57:57.789Z - debug: Request received with params: {"desiredCapabilities":{"platformName":"iOS","platformVersion":"7.1","newCommandTimeout":"999999","automationName":"Appium"}}

2014-08-21T17:57:57.790Z - error: The following desired capabilities are required, but were not provided: deviceName

2014-08-21T17:57:57.790Z - debug: Got configuration error, not starting session

2014-08-21T17:57:57.791Z - debug: Cleaning up appium session

2014-08-21T17:57:57.791Z - error: Failed to start an Appium session, err was: Error: The following desired capabilities are required, but were not provided: deviceName

2014-08-21T17:57:57.791Z - debug: Error: The following desired capabilities are required, but were not provided: deviceName

    at Capabilities.checkValidity (/Volumes/Appium/Appium.app/Contents/Resources/node_modules/appium/lib/server/capabilities.js:120:13)

    at Appium.configure (/Volumes/Appium/Appium.app/Contents/Resources/node_modules/appium/lib/appium.js:256:35)

    at Appium.start (/Volumes/Appium/Appium.app/Contents/Resources/node_modules/appium/lib/appium.js:100:10)

    at Object.exports.createSession [as handle] (/Volumes/Appium/Appium.app/Contents/Resources/node_modules/appium/lib/server/controller.js:159:16)

    at next_layer (/Volumes/Appium/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:103:13)

    at Route.dispatch (/Volumes/Appium/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:107:5)

    at /Volumes/Appium/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:213:24

    at Function.proto.process_params (/Volumes/Appium/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:286:12)

    at next (/Volumes/Appium/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:207:19)

    at next (/Volumes/Appium/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:182:38)

2014-08-21T17:57:57.791Z - debug: Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: The following desired capabilities are required, but were not provided: deviceName)","origValue":"The following desired capabilities are required, but were not provided: deviceName"},"sessionId":null}



2014-08-21T17:58:08.130Z - info: --> GET /wd/hub/status {}



—————————————————



When Launching with ‘Prelaunch Application’:Enabled, got following errors



2014-08-21T18:00:55.417Z - debug: Attempting to retry launching instruments, this is retry #3

2014-08-21T18:00:55.418Z - debug: Killall iPhoneSimulator



2014-08-21T18:01:00.420Z - info: Launching instruments



2014-08-21T18:01:00.421Z - debug: Attempting to run app on iPhone Retina (4-inch) - Simulator - iOS 7.1



2014-08-21T18:01:00.422Z - debug: Spawning instruments with command: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate -w iPhone Retina (4-inch) - Simulator - iOS 7.1 /Users/umairrashid/Library/Application Support/iPhone Simulator/7.1/Applications/878133B5-7078-4E92-B3A2-607A3A3C2AC3/Recipes.app -e UIASCRIPT /Users/umairrashid/Library/Application Support/appium/bootstrap/bootstrap-7a459bb511e03f3b.js -e UIARESULTSPATH /tmp/appium-instruments

2014-08-21T18:01:00.422Z - debug: And extra without-delay env: {"DYLD_INSERT_LIBRARIES":"/Volumes/Appium/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-instruments/thirdparty/iwd/InstrumentsShim.dylib","LIB_PATH":"/Volumes/Appium/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-instruments/thirdparty/iwd"}

2014-08-21T18:01:00.422Z - debug: And launch timeouts (in ms): {"global":90000}



2014-08-21T18:01:01.415Z - debug: [INST STDERR] Instruments Usage Error : Could not remove existing output document 'file:///Volumes/Appium/Appium.app/Contents/Resources/node_modules/appium/instrumentscli0.trace': Error Domain=NSCocoaErrorDomain Code=642 "You can’t save the file “instrumentscli0.trace” because the volume “Appium” is read only." UserInfo=0x7fac5e2d6100 {NSFilePath=/Volumes/Appium/Appium.app/Contents/Resources/node_modules/appium/instrumentscli0.trace, NSUnderlyingError=0x7fac5d92d760 "The operation couldn’t be completed. Read-only file system"}.





2014-08-21T18:01:01.483Z - debug: [INSTSERVER] Instruments exited with code 254



2014-08-21T18:01:01.483Z - debug: Killall instruments



2014-08-21T18:01:01.486Z - debug: Instruments crashed on startup

在这里,我期望当我点击检查按钮从Appium,然后模拟器启动,我可以看到XPaths等在该视图。

EN

回答 2

Stack Overflow用户

发布于 2014-08-22 11:49:49

  1. 你确定你选中了苹果的图标吗(有时我们会做愚蠢的错误点击)
  2. 如果您已经检查过“强制装置”,请取消检查。

如果你还有问题,最好是把你的appium gui截图发到这里,这样我就可以帮你更多的忙了。

票数 0
EN

Stack Overflow用户

发布于 2014-08-24 16:40:22

您确定通过将Appium.app拖到应用程序文件夹中已安装了Appium吗?

下面的错误消息建议您只是从DMG文件中启动它。

代码语言:javascript
复制
Instruments Usage Error : Could not remove existing output document 'file:///Volumes/Appium/Appium.app/Contents/Resources/node_modules/appium/instrumentscli0.trace'
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/25433841

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档