Appium-Help required:Simulator没有从Appium.app启动应用程序

时间:2014-08-21 18:50:28

标签: ios macos appium

在运行Appium应用程序进行自动化移动应用程序测试时出现问题

以下工具版本我正在使用 Appium版本:1.2.1 Xcode:5.1.1

以下是我正在做的步骤,

  1. 下载Appium.dmg
  2. 运行dmg文件,然后启动appium.app文件
  3. 从Xcode
  4. 构建7.1模拟器的应用程序
  5. 在appium.app上启用“App Path”选项并提供.app文件路径“/ Users / umairrashid / Library / Application Support / iPhone Simulator / 7.1 / Applications / 878133B5-7078-4E92-B3A2-607A3A3C2AC3 / Recipes。应用程序”
  6. 在“常规设置”中, 服务器地址:127.0.0.1,端口:4723
  7. 检查更新:已启用
  8. 新命令超时:7200s
  9. 当我点击“启动”按钮时,一切似乎都没问题。

    单击“检查器”按钮,然后显示错误

    无法启动Appium Inspector

    无法开始新会话

    确保Appium服务器正在运行,并使用" App Path" Appium.app中的参数(以及Android的包和活动)或通过与selenium客户端连接并在所需的功能对象中提供此参数。

    在Appium Console中,我收到了以下错误,

    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中的Inspect按钮然后启动Simulator时,我可以在该视图中看到XPath等。

2 个答案:

答案 0 :(得分:0)

  1. 你确定你选择了苹果的图标(有时候我们做了傻傻的错误点击)

  2. 如果你有&#34;强制设备&#34;检查请取消选中。

  3. 如果你仍然遇到问题,你最好截取你的appium gui的截图并在此发布,这样我就可以通过更多的方式提供帮助

答案 1 :(得分:0)

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

以下错误消息表明您只是从DMG文件启动它。

Instruments Usage Error : Could not remove existing output document 'file:///Volumes/Appium/Appium.app/Contents/Resources/node_modules/appium/instrumentscli0.trace'