菜鸟教程小白 发表于 2022-12-12 17:54:37

java - AppiumGUI 中的 Appium 启动器


                                            <p><p>谁能告诉我 Appium GUI 必须有一个 safari 启动器吗?如果没有,我如何将此启动器添加到 appium?
我试图添加它。我尝试从 github ( <a href="https://github.com/budhash/SafariLauncher" rel="noreferrer noopener nofollow">https://github.com/budhash/SafariLauncher</a> ) 编译项目并将编译后的存档放入 appium。
当我尝试使用它时 - Safari 已启动,但出现错误,启动器找不到按钮。
我需要做什么?</p>

<p>感谢和问候</p>

<p><strong>控制台日志</strong></p>

<pre><code>error: Error. Could not find button to launch Safari. Make sure you are using the latest version of SafariLauncher that appium is using

info: Error: Error. Could not find button to launch Safari. Make sure you are using the latest version of SafariLauncher that appium is using
at . (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/ios/safari.js:70:17)
at . (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/common.js:77:12)
at .iOSController.handleFindCb (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/ios/ios-controller.js:313:5)
at . (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/ios/ios-controller.js:138:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/async/lib/async.js:798:43)
at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/async/lib/async.js:32:16
at .exports.respond (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/common.js:28:9)
at . (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/ios/ios.js:1498:18)
at getResultAndSendNext (/Applications/Appium.app/Contents/Resources/node_modules/appium/submodules/appium-uiauto/lib/command-proxy.js:146:20)
at Socket. (/Applications/Appium.app/Contents/Resources/node_modules/appium/submodules/appium-uiauto/lib/command-proxy.js:88:7)
at Socket.emit (events.js:129:20)
at streamreadable.js:908:16
at process._tickDomainCallback (node.js:381:11)
</code></pre>

<p><strong>我的 java 代码:</strong></p>

<pre><code>public static void main(String[] args) {
      DesiredCapabilities safari = new DesiredCapabilities();
      safari.setCapability(&#34;browser&#34;, &#34;Safari&#34;);
      safari.setCapability(&#34;platformName&#34;, &#34;iOS&#34;);
      safari.setCapability(&#34;deviceName&#34;, &#34;iPod asolovei&#34;);
      AppiumDriver driver = null;

      System.out.println(&#34;Before connect to server&#34;);

      try {
            driver = new IOSDriver(new URL(&#34;http://192.168.10.42:4723/wd/hub&#34;), safari);
      } catch (MalformedURLException ex) {
            System.out.println(ex.getMessage());
      }
      System.out.println(&#34;After connect to server&#34;);

      driver.get(&#34;http://www.google.com/&#34;);

      System.out.println(driver.getTitle());
      driver.quit();
    }
</code></pre></p>
                                    <br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
                                            <p><p>看起来配置文件有问题。
访问这里 <a href="https://discuss.appium.io/t/error-installing-safari-launcher-on-real-device-appium-v1-3-7/3793" rel="noreferrer noopener nofollow">https://discuss.appium.io/t/error-installing-safari-launcher-on-real-device-appium-v1-3-7/3793</a> </p>

<p>这个帖子有相同的解决方案。</p></p>
                                   
                                                <p style="font-size: 20px;">关于java - AppiumGUI 中的 Appium 启动器,我们在Stack Overflow上找到一个类似的问题:
                                                        <a href="https://stackoverflow.com/questions/34355270/" rel="noreferrer noopener nofollow" style="color: red;">
                                                                https://stackoverflow.com/questions/34355270/
                                                        </a>
                                                </p>
                                       
页: [1]
查看完整版本: java - AppiumGUI 中的 Appium 启动器