真实设备上的Appium Inspector-iOS [英] Appium inspector on real device - iOS

查看:126
本文介绍了真实设备上的Appium Inspector-iOS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在评估Appium的iOS自动化测试.作为其一部分,当我选择设备目标作为iPhone模拟器时,我能够成功执行appium元素检查器.但是,当我将真实设备作为目标时,我无法调用元素检查器.

I am evaluvating Appium for my iOS automation testing. As a part of that, I am able to successfully execute appium element inspector when I choose my device target as iPhone simulator. But I am not able to invoke element inspector when I target real device.

我已经使用开发配置文件对我的应用程序进行了签名,并且能够从Xcode 5安装和运行我的应用程序.因此,我的应用程序设置看起来还可以,因为我能够运行我的应用程序.

I have signed my app with a development provisioning profile and I am able to install and run my app from Xcode 5. So my app setup looks okay as I am able to run my application.

然后,我在Appium.app GUI中配置了所有详细信息,例如捆绑包ID,设备等...,并启动了appium服务器和检查器.启动检查器后,我的应用程序已在设备中成功打开,但未执行任何进一步的操作,几秒钟后,我弹出一个窗口,提示请确保appium服务器正在运行,并且当前已设置APP_PATH.... "

Then I configured all the details in Appium.app GUI like bundle id, device etc... and started the appium server and inspector. When inspector is launched, my app is opened successfully in device but it is not doing any further action and after few seconds, I get a pop as "Please make sure appium server is running and APP_PATH is setup currently......."

我调用了一些调试日志,但无法从日志中找出问题所在.附加日志

I invoked some debugging logs and I am not able to figure out what is the issue from logs. Attaching logs

info: Welcome to Appium v1.2.0 (REV e53f49c706a25242e66d36685c268b599cc18da5)

debug: Non-default server args: {"app":"com.bharathapp.npuzzle","udid":"a3c3ccbed22942bd7866cbf3751363004acec0a8","address":"127.0.0.1","sessionOverride":true,"fullReset":true,"deviceName":"iPhone Retina (4-inch 64-bit)","orientation":"Portrait","showSimulatorLog":true,"defaultCommandTimeout":7200}

info: Appium REST http interface listener started on 127.0.0.1:4723
info: LogLevel: debug

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

debug: Appium request initiated at /wd/hub/status

debug: Request received with params: {}
debug: Responding to client with success: {"status":0,"value":{"build":{"version":"1.2.0","revision":"e53f49c706a25242e66d36685c268b599cc18da5"}}}

info: <-- GET /wd/hub/status 200 7.573 ms - 104 {"status":0,"value":{"build":{"version":"1.2.0","revision":"e53f49c706a25242e66d36685c268b599cc18da5"}}}

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

debug: Appium request initiated at /wd/hub/status

info: <-- GET /wd/hub/status 200 2.758 ms - 104 {"status":0,"value":{"build":{"version":"1.2.0","revision":"e53f49c706a25242e66d36685c268b599cc18da5"}}}

debug: Request received with params: {}
debug: Responding to client with success: {"status":0,"value":{"build":{"version":"1.2.0","revision":"e53f49c706a25242e66d36685c268b599cc18da5"}}}

debug: Appium request initiated at /wd/hub/status

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

debug: Request received with params: {}
debug: Responding to client with success: {"status":0,"value":{"build":{"version":"1.2.0","revision":"e53f49c706a25242e66d36685c268b599cc18da5"}}}
debug: Appium request initiated at /wd/hub/sessions
debug: Request received with params: {}
debug: Responding to client with success: {"status":0,"value":[]}
debug: Appium request initiated at /wd/hub/session
debug: Request received with params: {"desiredCapabilities":{"platformName":"iOS","platformVersion":"7.1","newCommandTimeout":"999999","automationName":"Appium","deviceName":"iPhone Retina (4-inch 64-bit)"}}
debug: App is an iOS bundle, will attempt to run as pre-existing
debug: Creating new appium session c8bdf0b6-ee57-47ce-ac74-da6ef6d01a27
debug: Removing any remaining instruments sockets
debug: Cleaned up instruments socket /tmp/instruments_sock
debug: Cleaning up any tracedirs
debug: No tracedirs to clean up
debug: Setting Xcode folder
debug: Setting Xcode version
debug: Setting iOS SDK Version
debug: iOS SDK Version set to 7.1
debug: Detecting automation tracetemplate
debug: Not auto-detecting udid, running on sim
debug: Localizable.strings is not currently supported when using real devices.
debug: Not setting locale because we're using a real device
debug: Creating instruments
debug: Preparing uiauto bootstrap
debug: Dynamic bootstrap dir: /Users/BharathMBA/Library/Application Support/appium/bootstrap
debug: Dynamic env: {"nodePath":"/Applications/Appium.app/Contents/Resources/node/bin/node","commandProxyClientPath":"/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-uiauto/bin/command-proxy-client.js"}
debug: Dynamic bootstrap code: // This file is automatically generated. Do not manually modify!

#import "/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-uiauto/uiauto/bootstrap.js";

bootstrap({
  nodePath: "/Applications/Appium.app/Contents/Resources/node/bin/node",
  commandProxyClientPath: "/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-uiauto/bin/command-proxy-client.js",
});
debug: Dynamic bootstrap path: /Users/BharathMBA/Library/Application Support/appium/bootstrap/bootstrap-fe8fa37a970f98cc.js
debug: Reusing dynamic bootstrap: /Users/BharathMBA/Library/Application Support/appium/bootstrap/bootstrap-fe8fa37a970f98cc.js
debug: Not setting iOS and app preferences since we're on a real device
debug: Starting iOS device log capture via idevicesyslog
debug: Not setting device type since we're connected to a device
debug: Real device specified but no ipa or app path, assuming bundle ID is on device
debug: Starting command proxy.
debug: Instruments socket server started at /tmp/instruments_sock
debug: Starting instruments
debug: Instruments is at: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments
debug: Attempting to run app on real device with UDID a3c3ccbed22942bd7866cbf3751363004acec0a8
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 a3c3ccbed22942bd7866cbf3751363004acec0a8 com.bharathapp.npuzzle -e UIASCRIPT /Users/BharathMBA/Library/Application Support/appium/bootstrap/bootstrap-fe8fa37a970f98cc.js -e UIARESULTSPATH /tmp/appium-instruments
debug: And extra without-delay env: {}
debug: And launch timeouts (in ms): {"global":90000}
debug: [IOS_SYSLOG_ROW ] Aug 14 09:35:15 Bharath DTMobileIS[10421] <Warning>: Could not create service named com.apple.instruments.server.services.filebrowser
info: <-- GET /wd/hub/status 200 1.234 ms - 104 {"status":0,"value":{"build":{"version":"1.2.0","revision":"e53f49c706a25242e66d36685c268b599cc18da5"}}}
info: --> GET /wd/hub/sessions {}
info: <-- GET /wd/hub/sessions 200 15.674 ms - 23 {"status":0,"value":[]}
info: --> POST /wd/hub/session {"desiredCapabilities":{"platformName":"iOS","platformVersion":"7.1","newCommandTimeout":"999999","automationName":"Appium","deviceName":"iPhone Retina (4-inch 64-bit)"}}
info: Launching instruments
info: --> GET /wd/hub/status {}
info: <-- GET /wd/hub/status 200 1.998 ms - 155 {"status":0,"value":{"build":{"version":"1.2.0","revision":"e53f49c706a25242e66d36685c268b599cc18da5"}},"sessionId":"c8bdf0b6-ee57-47ce-ac74-da6ef6d01a27"}
warn: Instruments socket client never checked in; timing out (global)
info: Launching instruments
info: <-- POST /wd/hub/session - - ms - - 


debug: [IOS_SYSLOG_ROW ] Aug 14 09:35:15 Bharath DTMobileIS[10421] <Warning>: Could not create service named com.apple.instruments.server.services.launchdaemon
debug: [IOS_SYSLOG_ROW ] Aug 14 09:35:15 Bharath DTMobileIS[10421] <Warning>: Could not create service named com.apple.instruments.server.services.processcontrol.posixspawn
debug: [IOS_SYSLOG_ROW ] Aug 14 09:35:16 Bharath kernel[0] <Debug>: launchd[10422] Container: /private/var/mobile/Applications/A264164B-EEDE-43CF-80AF-6972D5C0E829 (sandbox)
debug: [IOS_SYSLOG_ROW ] Aug 14 09:35:16 Bharath backboardd[28] <Error>: HID: The 'Passive' connection 'npuzzle' access to protected services is denied.
debug: [IOS_SYSLOG_ROW ] Aug 14 09:35:16 Bharath networkd[82] <Warning>: Analytics Engine: double ON for app: com.bharathapp.npuzzle
debug: [IOS_SYSLOG_ROW ] Aug 14 09:35:17 Bharath DTMobileIS[10421] <Warning>: CLTilesManagerClient: initialize, sSharedTilesManagerClient
debug: [IOS_SYSLOG_ROW ] Aug 14 09:35:17 Bharath DTMobileIS[10421] <Warning>: CLTilesManagerClient: init
debug: [IOS_SYSLOG_ROW ] Aug 14 09:35:17 Bharath DTMobileIS[10421] <Warning>: CLTilesManagerClient: reconnecting, 0x15d914b0
debug: [IOS_SYSLOG_ROW ] Aug 14 09:35:17 Bharath AdSheet[10418] <Warning>: [AppDeveloper] Fill rate for development application 'com.bharathapp.npuzzle': 80.0%
debug: [IOS_SYSLOG_ROW ] Aug 14 09:35:17 Bharath DTMobileIS[10421] <Error>: CoreLocation: could not chmod /var/mobile/Library/Preferences/com.apple.CoreMotion.plist errno 2 (No such file or directory)
debug: [IOS_SYSLOG_ROW ] Aug 14 09:35:17 Bharath DTMobileIS[10421] <Error>: CoreLocation: could not chown /var/mobile/Library/Preferences/com.apple.CoreMotion.plist errno 2 (No such file or directory)
debug: [IOS_SYSLOG_ROW ] Aug 14 09:35:17 Bharath DTMobileIS[10421] <Warning>: -[UIAutomationService _startUpAgent]: posix_spawn(): Resource temporarily unavailable
debug: [IOS_SYSLOG_ROW ] Aug 14 09:35:35 Bharath lockdownd[52] <Notice>: 00281000 _select_socket: receive secure message timeout!
debug: [IOS_SYSLOG_ROW ] Aug 14 09:35:35 Bharath lockdownd[52] <Notice>: 00281000 _receive_message: walk away - non-SSL 1
debug: [IOS_SYSLOG_ROW ] Aug 14 09:36:06 Bharath AdSheet[10418] <Warning>: [AppDeveloper] Fill rate for development application 'com.bharathapp.npuzzle': 80.0%
debug: [IOS_SYSLOG_ROW ] Aug 14 09:36:06 Bharath AdSheet[10418] <Warning>: [AppDeveloper] Simulating an inventory-unavailable server response due to development application fill rate. To change the fill rate, see the Developer panel in Settings.
debug: [IOS_SYSLOG_ROW ] Aug 14 09:36:06 Bharath npuzzle[10422] <Warning>: The operation couldn’t be completed. Ad inventory unavailable
debug: Appium request initiated at /wd/hub/status
debug: Request received with params: {}
debug: Responding to client with success: {"status":0,"value":{"build":{"version":"1.2.0","revision":"e53f49c706a25242e66d36685c268b599cc18da5"}},"sessionId":"c8bdf0b6-ee57-47ce-ac74-da6ef6d01a27"}
debug: Killall instruments
debug: [INSTSERVER] Instruments exited with code null
debug: Killall instruments
debug: Attempting to retry launching instruments, this is retry #1
debug: Killall iPhoneSimulator
debug: Attempting to run app on real device with UDID a3c3ccbed22942bd7866cbf3751363004acec0a8
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 a3c3ccbed22942bd7866cbf3751363004acec0a8 com.bharathapp.npuzzle -e UIASCRIPT /Users/BharathMBA/Library/Application Support/appium/bootstrap/bootstrap-fe8fa37a970f98cc.js -e UIARESULTSPATH /tmp/appium-instruments
debug: And extra without-delay env: {}
debug: An
d launch timeouts (in ms): {"global":90000}
debug: [IOS_SYSLOG_ROW ] Aug 14 09:36:50 Bharath DTMobileIS[10423] <Warning>: Could not create service named com.apple.instruments.server.services.filebrowser
debug: [IOS_SYSLOG_ROW ] Aug 14 09:36:50 Bharath DTMobileIS[10423] <Warning>: Could not create service named com.apple.instruments.server.services.launchdaemon
debug: [IOS_SYSLOG_ROW ] Aug 14 09:36:50 Bharath DTMobileIS[10423] <Warning>: Could not create service named com.apple.instruments.server.services.processcontrol.posixspawn
debug: [IOS_SYSLOG_ROW ] Aug 14 09:36:51 Bharath com.apple.launchd[1] (UIKitApplication:com.bharathapp.npuzzle[0x3713][10422]) <Notice>: (UIKitApplication:com.bharathapp.npuzzle[0x3713]) Exited: Killed: 9
debug: [IOS_SYSLOG_ROW ] Aug 14 09:36:51 Bharath backboardd[28] <Warning>: Application 'UIKitApplication:com.bharathapp.npuzzle[0x3713]' exited abnormally with signal 9: Killed: 9
debug: [IOS_SYSLOG_ROW ] Aug 14 09:36:51 Bharath AdSheet[10418] <Warning>: tcp_connection_set_source_application proc_pidinfo PROC_PIDUNIQIDENTIFIERINFO for pid 10422 failed
debug: [IOS_SYSLOG_ROW ] Aug 14 09:36:51 Bharath AdSheet[10418] <Error>: tcp_connection_host_start 8 DNSServiceCreateDelegateConnection failed: -65555
debug: [IOS_SYSLOG_ROW ] Aug 14 09:36:52 Bharath AdSheet[10418] <Warning>: tcp_connection_set_source_application proc_pidinfo PROC_PIDUNIQIDENTIFIERINFO for pid 10422 failed
debug: [IOS_SYSLOG_ROW ] Aug 14 09:36:52 Bharath AdSheet[10418] <Error>: tcp_connection_host_start 11 DNSServiceCreateDelegateConnection failed: -65555
debug: [IOS_SYSLOG_ROW ] Aug 14 09:36:53 Bharath kernel[0] <Debug>: launchd[10424] Container: /private/var/mobile/Applications/A264164B-EEDE-43CF-80AF-6972D5C0E829 (sandbox)
debug: [IOS_SYSLOG_ROW ] Aug 14 09:36:53 Bharath backboardd[28] <Error>: HID: The 'Passive' connection 'npuzzle' access to protected services is denied.
debug: [IOS_SYSLOG_ROW ] Aug 14 09:36:53 Bharath DTMobileIS[10423] <Warning>: CLTilesManagerClient: initialize, sSharedTilesManagerClient
debug: [IOS_SYSLOG_ROW ] Aug 14 09:36:53 Bharath DTMobileIS[10423] <Warning>: CLTilesManagerClient: init
debug: [IOS_SYSLOG_ROW ] Aug 14 09:36:53 Bharath DTMobileIS[10423] <Warning>: CLTilesManagerClient: reconnecting, 0x1656a780
debug: [IOS_SYSLOG_ROW ] Aug 14 09:36:53 Bharath AdSheet[10418] <Warning>: [AppDeveloper] Fill rate for development application 'com.bharathapp.npuzzle': 80.0%
debug: [IOS_SYSLOG_ROW ] Aug 14 09:36:53 Bharath AdSheet[10418] <Warning>: [AppDeveloper] Simulating an inventory-unavailable server response due to development application fill rate. To change the fill rate, see the Developer panel in Settings.
debug: [IOS_SYSLOG_ROW ] Aug 14 09:36:53 Bharath npuzzle[10424] <Warning>: The operation couldn’t be completed. Ad inventory unavailable
debug: [IOS_SYSLOG_ROW ] Aug 14 09:36:53 Bharath DTMobileIS[10423] <Error>: CoreLocation: could not chmod /var/mobile/Library/Preferences/com.apple.CoreMotion.plist errno 2 (No such file or directory)
debug: [IOS_SYSLOG_ROW ] Aug 14 09:36:53 Bharath DTMobileIS[10423] <Error>: CoreLocation: could not chown /var/mobile/Library/Preferences/com.apple.CoreMotion.plist errno 2 (No such file or directory)
debug: [IOS_SYSLOG_ROW ] Aug 14 09:36:53 Bharath DTMobileIS[10423] <Warning>: -[UIAutomationService _startUpAgent]: posix_spawn(): Resource temporarily unavailable
debug: [IOS_SYSLOG_ROW ] Aug 14 09:36:54 Bharath npuzzle[10424] <Warning>: The operation couldn’t be completed. Banner view is visible but does not have content
debug: [IOS_SYSLOG_ROW ] Aug 14 09:37:10 Bharath lockdownd[52] <Notice>: 00281000 _select_socket: receive secure message timeout!
debug: [IOS_SYSLOG_ROW ] Aug 14 09:37:10 Bharath lockdownd[52] <Notice>: 00281000 _receive_message: walk away - non-SSL 1

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

debug: Appium request initiated at /wd/hub/status

info: <-- GET /wd/hub/status 200 2.278 ms - 155 {"status":0,"value":{"build":{"version":"1.2.0","revision":"e53f49c706a25242e66d36685c268b599cc18da5"}},"sessionId":"c8bdf0b6-ee57-47ce-ac74-da6ef6d01a27"}

debug: Request received with params: {}
debug: Responding to client with success: {"status":0,"value":{"build":{"version":"1.2.0","revision":"e53f49c706a25242e66d36685c268b599cc18da5"}},"sessionId":"c8bdf0b6-ee57-47ce-ac74-da6ef6d01a27"}

推荐答案

您正在获取日志:

已指定实际设备,但没有ipa或应用程序路径,假设捆绑包ID在设备上"

当我尝试在没有应用程序路径的情况下运行检查器时,出现错误消息:

When I try to run the inspector without the app path, I get the error:

...通过在Appium.app中使用"App Path"参数打开的应用程序运行,或者通过与selenium客户端连接并将其提供给所需的功能对象来运行.

尝试一下:

  • 以Xcode归档构建,然后将生成的.app文件复制到相关目录中.
  • 将.app文件的路径复制到应用程序路径"配置中.
  • 运行
  • Archive a build in Xcode, then copy the .app file that's generated into a relevant directory.
  • Copy the path of the .app file into the 'app path' configuration.
  • Run It

这篇关于真实设备上的Appium Inspector-iOS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆