<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                ## iOS 'mobile:': 元素滑動(Element swipe) 在一個元素內滑動,需要在滑動方法中指定元素ID。 ```java // 找到要滑動的元素 MobileElement el = (MobileElement) driver.findElement(MobileBy.id("my_id")); // 執行滾動操作(scroll) mobileScrollElementIOS(el, Direction.RIGHT); mobileScrollElementIOS(el, Direction.LEFT); // 執行滑動(swipe) // !注意! 執行與scroll相同的動作時,swipe的方向參數正好相反 mobileSwipeElementIOS(el, Direction.LEFT); mobileSwipeElementIOS(el, Direction.RIGHT); /** * Performs scroll inside element * * @param el the element to scroll * @param dir the direction of scroll * @version java-client: 7.3.0 **/ public void mobileScrollElementIOS(MobileElement el, Direction dir) { System.out.println("mobileScrollElementIOS(): dir: '" + dir + "'"); // always log your actions // Animation default time: // - iOS: 200 ms // final value depends on your app and could be greater final int ANIMATION_TIME = 200; // ms final HashMap<String, String> scrollObject = new HashMap<String, String>(); switch (dir) { case DOWN: // from down to up (! differs from mobile:swipe) case UP: // from up to down (! differs from mobile:swipe) case LEFT: // from left to right (! differs from mobile:swipe) case RIGHT: // from right to left (! differs from mobile:swipe) scrollObject.put("direction", dir.name().toLowerCase()); break; default: throw new IllegalArgumentException("mobileScrollElementIOS(): dir: '" + dir + "' NOT supported"); } scrollObject.put("element", el.getId()); try { driver.executeScript("mobile:scroll", scrollObject); // swipe faster then scroll Thread.sleep(ANIMATION_TIME); // always allow swipe action to complete } catch (Exception e) { System.err.println("mobileScrollElementIOS(): FAILED\n" + e.getMessage()); return; } } /** * Performs swipe inside element * * @param el the element to swipe * @param dir the direction of swipe * @version java-client: 7.3.0 **/ public void mobileSwipeElementIOS(MobileElement el, Direction dir) { System.out.println("mobileSwipeElementIOS(): dir: '" + dir + "'"); // always log your actions // Animation default time: // - iOS: 200 ms // final value depends on your app and could be greater final int ANIMATION_TIME = 200; // ms final HashMap<String, String> scrollObject = new HashMap<String, String>(); switch (dir) { case DOWN: // from up to down (! differs from mobile:scroll) case UP: // from down to up (! differs from mobile:scroll) case LEFT: // from right to left (! differs from mobile:scroll) case RIGHT: // from left to right (! differs from mobile:scroll) scrollObject.put("direction", dir.name().toLowerCase()); break; default: throw new IllegalArgumentException("mobileSwipeElementIOS(): dir: '" + dir + "' NOT supported"); } scrollObject.put("element", el.getId()); try { driver.executeScript("mobile:swipe", scrollObject); Thread.sleep(ANIMATION_TIME); // 始終運行滑動動作執行完畢 } catch (Exception e) { System.err.println("mobileSwipeElementIOS(): FAILED\n" + e.getMessage()); return; } } ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看