首页 文章

真实设备上的Appium检查员 - iOS

提问于
浏览
2

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

我已经使用开发配置文件签署了我的应用程序,我可以从Xcode 5安装和运行我的应用程序 . 所以我的应用程序设置看起来没问题,因为我能够运行我的应用程序 .

然后我在Appium.app GUI中配置了所有细节,比如包ID,设备等......并启动了appium服务器和检查器 . 当检查器启动时,我的应用程序在设备中成功打开,但它没有做任何进一步的操作,几秒钟后,我得到一个弹出“请确保appium服务器正在运行,APP_PATH目前正在设置....... “

我调用了一些调试日志,我无法弄清楚日志中的问题 . 附加日志

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"}

1 回答

  • 2

    You're getting the log:

    “指定了真实设备但没有ipa或app路径,假设捆绑ID在设备上”

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

    ...使用Appium.app中的“App Path”参数打开应用程序,或者通过连接selenium客户端并在所需的功能对象中提供 .

    Try This:

    在Xcode中归档构建,然后将生成的.app文件复制到相关目录中 . 将.app文件的路径复制到“app path”配置中 . 运行

相关问题