菜鸟教程小白 发表于 2022-12-12 11:24:53

ios - 真实设备上的 Appium 检查器 - iOS


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

<p>我已经使用开发配置文件签署了我的应用程序,并且我能够从 Xcode 5 安装和运行我的应用程序。所以我的应用程序设置看起来不错,因为我能够运行我的应用程序。</p>

<p>然后我在 Appium.app GUI 中配置了所有详细信息,例如捆绑 ID、设备等...并启动了 appium 服务器和检查器。当检查器启动时,我的应用程序在设备中成功打开,但它没有做任何进一步的操作,几秒钟后,我收到一个弹出消息“请确保 appium 服务器正在运行并且当前设置了 APP_PATH ...... "</p>

<p>我调用了一些调试日志,但无法从日志中找出问题所在。附加日志</p>

<pre><code>info: Welcome to Appium v1.2.0 (REV e53f49c706a25242e66d36685c268b599cc18da5)

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

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

info: --&gt; GET /wd/hub/status {}

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

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

info: &lt;-- GET /wd/hub/status 200 7.573 ms - 104 {&#34;status&#34;:0,&#34;value&#34;:{&#34;build&#34;:{&#34;version&#34;:&#34;1.2.0&#34;,&#34;revision&#34;:&#34;e53f49c706a25242e66d36685c268b599cc18da5&#34;}}}

info: --&gt; GET /wd/hub/status {}

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

info: &lt;-- GET /wd/hub/status 200 2.758 ms - 104 {&#34;status&#34;:0,&#34;value&#34;:{&#34;build&#34;:{&#34;version&#34;:&#34;1.2.0&#34;,&#34;revision&#34;:&#34;e53f49c706a25242e66d36685c268b599cc18da5&#34;}}}

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

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

info: --&gt; GET /wd/hub/status {}

debug: Request received with params: {}
debug: Responding to client with success: {&#34;status&#34;:0,&#34;value&#34;:{&#34;build&#34;:{&#34;version&#34;:&#34;1.2.0&#34;,&#34;revision&#34;:&#34;e53f49c706a25242e66d36685c268b599cc18da5&#34;}}}
debug: Appium request initiated at /wd/hub/sessions
debug: Request received with params: {}
debug: Responding to client with success: {&#34;status&#34;:0,&#34;value&#34;:[]}
debug: Appium request initiated at /wd/hub/session
debug: Request received with params: {&#34;desiredCapabilities&#34;:{&#34;platformName&#34;:&#34;iOS&#34;,&#34;platformVersion&#34;:&#34;7.1&#34;,&#34;newCommandTimeout&#34;:&#34;999999&#34;,&#34;automationName&#34;:&#34;Appium&#34;,&#34;deviceName&#34;:&#34;iPhone Retina (4-inch 64-bit)&#34;}}
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&#39;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: {&#34;nodePath&#34;:&#34;/Applications/Appium.app/Contents/Resources/node/bin/node&#34;,&#34;commandProxyClientPath&#34;:&#34;/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-uiauto/bin/command-proxy-client.js&#34;}
debug: Dynamic bootstrap code: // This file is automatically generated. Do not manually modify!

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

bootstrap({
nodePath: &#34;/Applications/Appium.app/Contents/Resources/node/bin/node&#34;,
commandProxyClientPath: &#34;/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-uiauto/bin/command-proxy-client.js&#34;,
});
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&#39;re on a real device
debug: Starting iOS device log capture via idevicesyslog
debug: Not setting device type since we&#39;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): {&#34;global&#34;:90000}
debug: Aug 14 09:35:15 Bharath DTMobileIS &lt;Warning&gt;: Could not create service named com.apple.instruments.server.services.filebrowser
info: &lt;-- GET /wd/hub/status 200 1.234 ms - 104 {&#34;status&#34;:0,&#34;value&#34;:{&#34;build&#34;:{&#34;version&#34;:&#34;1.2.0&#34;,&#34;revision&#34;:&#34;e53f49c706a25242e66d36685c268b599cc18da5&#34;}}}
info: --&gt; GET /wd/hub/sessions {}
info: &lt;-- GET /wd/hub/sessions 200 15.674 ms - 23 {&#34;status&#34;:0,&#34;value&#34;:[]}
info: --&gt; POST /wd/hub/session {&#34;desiredCapabilities&#34;:{&#34;platformName&#34;:&#34;iOS&#34;,&#34;platformVersion&#34;:&#34;7.1&#34;,&#34;newCommandTimeout&#34;:&#34;999999&#34;,&#34;automationName&#34;:&#34;Appium&#34;,&#34;deviceName&#34;:&#34;iPhone Retina (4-inch 64-bit)&#34;}}
info: Launching instruments
info: --&gt; GET /wd/hub/status {}
info: &lt;-- GET /wd/hub/status 200 1.998 ms - 155 {&#34;status&#34;:0,&#34;value&#34;:{&#34;build&#34;:{&#34;version&#34;:&#34;1.2.0&#34;,&#34;revision&#34;:&#34;e53f49c706a25242e66d36685c268b599cc18da5&#34;}},&#34;sessionId&#34;:&#34;c8bdf0b6-ee57-47ce-ac74-da6ef6d01a27&#34;}
warn: Instruments socket client never checked in; timing out (global)
info: Launching instruments
info: &lt;-- POST /wd/hub/session - - ms - -


debug: Aug 14 09:35:15 Bharath DTMobileIS &lt;Warning&gt;: Could not create service named com.apple.instruments.server.services.launchdaemon
debug: Aug 14 09:35:15 Bharath DTMobileIS &lt;Warning&gt;: Could not create service named com.apple.instruments.server.services.processcontrol.posixspawn
debug: Aug 14 09:35:16 Bharath kernel &lt;Debug&gt;: launchd Container: /private/var/mobile/Applications/A264164B-EEDE-43CF-80AF-6972D5C0E829 (sandbox)
debug: Aug 14 09:35:16 Bharath backboardd &lt;Error&gt;: HID: The &#39;Passive&#39; connection &#39;npuzzle&#39; access to protected services is denied.
debug: Aug 14 09:35:16 Bharath networkd &lt;Warning&gt;: Analytics Engine: double ON for app: com.bharathapp.npuzzle
debug: Aug 14 09:35:17 Bharath DTMobileIS &lt;Warning&gt;: CLTilesManagerClient: initialize, sSharedTilesManagerClient
debug: Aug 14 09:35:17 Bharath DTMobileIS &lt;Warning&gt;: CLTilesManagerClient: init
debug: Aug 14 09:35:17 Bharath DTMobileIS &lt;Warning&gt;: CLTilesManagerClient: reconnecting, 0x15d914b0
debug: Aug 14 09:35:17 Bharath AdSheet &lt;Warning&gt;: Fill rate for development application &#39;com.bharathapp.npuzzle&#39;: 80.0%
debug: Aug 14 09:35:17 Bharath DTMobileIS &lt;Error&gt;: CoreLocation: could not chmod /var/mobile/Library/Preferences/com.apple.CoreMotion.plist errno 2 (No such file or directory)
debug: Aug 14 09:35:17 Bharath DTMobileIS &lt;Error&gt;: CoreLocation: could not chown /var/mobile/Library/Preferences/com.apple.CoreMotion.plist errno 2 (No such file or directory)
debug: Aug 14 09:35:17 Bharath DTMobileIS &lt;Warning&gt;: -: posix_spawn(): Resource temporarily unavailable
debug: Aug 14 09:35:35 Bharath lockdownd &lt;Notice&gt;: 00281000 _select_socket: receive secure message timeout!
debug: Aug 14 09:35:35 Bharath lockdownd &lt;Notice&gt;: 00281000 _receive_message: walk away - non-SSL 1
debug: Aug 14 09:36:06 Bharath AdSheet &lt;Warning&gt;: Fill rate for development application &#39;com.bharathapp.npuzzle&#39;: 80.0%
debug: Aug 14 09:36:06 Bharath AdSheet &lt;Warning&gt;: Simulating an inventory-unavailable server response due to development application fill rate. To change the fill rate, see the Developer panel in Settings.
debug: Aug 14 09:36:06 Bharath npuzzle &lt;Warning&gt;: 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: {&#34;status&#34;:0,&#34;value&#34;:{&#34;build&#34;:{&#34;version&#34;:&#34;1.2.0&#34;,&#34;revision&#34;:&#34;e53f49c706a25242e66d36685c268b599cc18da5&#34;}},&#34;sessionId&#34;:&#34;c8bdf0b6-ee57-47ce-ac74-da6ef6d01a27&#34;}
debug: Killall instruments
debug: 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): {&#34;global&#34;:90000}
debug: Aug 14 09:36:50 Bharath DTMobileIS &lt;Warning&gt;: Could not create service named com.apple.instruments.server.services.filebrowser
debug: Aug 14 09:36:50 Bharath DTMobileIS &lt;Warning&gt;: Could not create service named com.apple.instruments.server.services.launchdaemon
debug: Aug 14 09:36:50 Bharath DTMobileIS &lt;Warning&gt;: Could not create service named com.apple.instruments.server.services.processcontrol.posixspawn
debug: Aug 14 09:36:51 Bharath com.apple.launchd (UIKitApplication:com.bharathapp.npuzzle) &lt;Notice&gt;: (UIKitApplication:com.bharathapp.npuzzle) Exited: Killed: 9
debug: Aug 14 09:36:51 Bharath backboardd &lt;Warning&gt;: Application &#39;UIKitApplication:com.bharathapp.npuzzle&#39; exited abnormally with signal 9: Killed: 9
debug: Aug 14 09:36:51 Bharath AdSheet &lt;Warning&gt;: tcp_connection_set_source_application proc_pidinfo PROC_PIDUNIQIDENTIFIERINFO for pid 10422 failed
debug: Aug 14 09:36:51 Bharath AdSheet &lt;Error&gt;: tcp_connection_host_start 8 DNSServiceCreateDelegateConnection failed: -65555
debug: Aug 14 09:36:52 Bharath AdSheet &lt;Warning&gt;: tcp_connection_set_source_application proc_pidinfo PROC_PIDUNIQIDENTIFIERINFO for pid 10422 failed
debug: Aug 14 09:36:52 Bharath AdSheet &lt;Error&gt;: tcp_connection_host_start 11 DNSServiceCreateDelegateConnection failed: -65555
debug: Aug 14 09:36:53 Bharath kernel &lt;Debug&gt;: launchd Container: /private/var/mobile/Applications/A264164B-EEDE-43CF-80AF-6972D5C0E829 (sandbox)
debug: Aug 14 09:36:53 Bharath backboardd &lt;Error&gt;: HID: The &#39;Passive&#39; connection &#39;npuzzle&#39; access to protected services is denied.
debug: Aug 14 09:36:53 Bharath DTMobileIS &lt;Warning&gt;: CLTilesManagerClient: initialize, sSharedTilesManagerClient
debug: Aug 14 09:36:53 Bharath DTMobileIS &lt;Warning&gt;: CLTilesManagerClient: init
debug: Aug 14 09:36:53 Bharath DTMobileIS &lt;Warning&gt;: CLTilesManagerClient: reconnecting, 0x1656a780
debug: Aug 14 09:36:53 Bharath AdSheet &lt;Warning&gt;: Fill rate for development application &#39;com.bharathapp.npuzzle&#39;: 80.0%
debug: Aug 14 09:36:53 Bharath AdSheet &lt;Warning&gt;: Simulating an inventory-unavailable server response due to development application fill rate. To change the fill rate, see the Developer panel in Settings.
debug: Aug 14 09:36:53 Bharath npuzzle &lt;Warning&gt;: The operation couldn’t be completed. Ad inventory unavailable
debug: Aug 14 09:36:53 Bharath DTMobileIS &lt;Error&gt;: CoreLocation: could not chmod /var/mobile/Library/Preferences/com.apple.CoreMotion.plist errno 2 (No such file or directory)
debug: Aug 14 09:36:53 Bharath DTMobileIS &lt;Error&gt;: CoreLocation: could not chown /var/mobile/Library/Preferences/com.apple.CoreMotion.plist errno 2 (No such file or directory)
debug: Aug 14 09:36:53 Bharath DTMobileIS &lt;Warning&gt;: -: posix_spawn(): Resource temporarily unavailable
debug: Aug 14 09:36:54 Bharath npuzzle &lt;Warning&gt;: The operation couldn’t be completed. Banner view is visible but does not have content
debug: Aug 14 09:37:10 Bharath lockdownd &lt;Notice&gt;: 00281000 _select_socket: receive secure message timeout!
debug: Aug 14 09:37:10 Bharath lockdownd &lt;Notice&gt;: 00281000 _receive_message: walk away - non-SSL 1

info: --&gt; GET /wd/hub/status {}

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

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

debug: Request received with params: {}
debug: Responding to client with success: {&#34;status&#34;:0,&#34;value&#34;:{&#34;build&#34;:{&#34;version&#34;:&#34;1.2.0&#34;,&#34;revision&#34;:&#34;e53f49c706a25242e66d36685c268b599cc18da5&#34;}},&#34;sessionId&#34;:&#34;c8bdf0b6-ee57-47ce-ac74-da6ef6d01a27&#34;}
</code></pre></p>
                                    <br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
                                            <p><p><strong>您正在获取日志:</strong></p>

<blockquote>
<p><em>&#34;Real device specified but no ipa or app path, assuming bundle ID is on device&#34;</em></p>
</blockquote>

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

<blockquote>
<p><em>...running with an application opened by using the &#34;App Path&#34; parameter in Appium.app ...or by connecting with selenium client and supplying this in the desired capabilities object.</em></p>
</blockquote>

<p><strong>试试这个:</strong> </p>

<blockquote>
<ul>
<li>Archive a build in Xcode, then copy the .app file that&#39;s generated into a relevant directory. </li>
<li>Copy the path of the .app file into the &#39;app path&#39; configuration. </li>
<li><strong>Run It</strong></li>
</ul>
</blockquote></p>
                                   
                                                <p style="font-size: 20px;">关于ios - 真实设备上的 Appium 检查器 - iOS,我们在Stack Overflow上找到一个类似的问题:
                                                        <a href="https://stackoverflow.com/questions/25303147/" rel="noreferrer noopener nofollow" style="color: red;">
                                                                https://stackoverflow.com/questions/25303147/
                                                        </a>
                                                </p>
                                       
页: [1]
查看完整版本: ios - 真实设备上的 Appium 检查器 - iOS