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

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

问题描述

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

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 文件的路径复制到应用路径"配置中.
  • 运行它

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

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