<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 功能強大 支持多語言、二開方便! 廣告
                # Touch Perform 執行觸摸動作序列 ## 使用樣例 ```java // Java TouchAction action = new TouchAction(driver); action.press(10, 10); action.moveTo(10, 100); action.release(); action.perform(); ``` ```python # Python from appium.webdriver.common.touch_action import TouchAction // ... actions = TouchAction(driver) actions.tap_and_hold(20, 20) actions.move_to(10, 100) actions.release() actions.perform() ``` ```javascript // Javascript // webdriver.io example driver.touchPerform([ { action: 'press', options: { x: 100, y: 250 }}, { action: 'moveTo', options: { x: 300, y: 100 }}, { action: 'release' } ]); // wd example let action = new wd.TouchAction(); action.press({x: 10, y: 10}); action.moveTo({x: 10, y: 100}); action.release(); await action.perform(); ``` ```ruby # Ruby # ruby_lib example touch_action.down(element).move_to(10, 100).up(50, 50).perform # ruby_lib_core example @driver.touch_action.down(element).move_to(10, 100).up(50, 50).perform ``` ```php # PHP // TODO PHP sample ``` ```csharp // C# TouchAction action = new TouchAction(driver); action.Press(10, 10); action.MoveTo(10, 100); action.Release(); action.Perform(); ``` ## 描述 此功能僅在本地環境中可用 “Touch-Perform”的工作原理與其他單一的觸摸交互類似,不同之處在于它允許你將多個觸摸操作合并成一個命令。這很有用,因為Appium命令是通過網絡發送的,而且命令之間存在延遲。這種延時會使一些特定的觸摸交互無法實現其功能,因為某些命令交互是需要按照順序進行的。例如,對于垂直方向需要按壓屏幕,然后向下移動到y坐標,然后釋放。 為了使其正常工作,交互之間不能有延遲。 ## 支持 ### Appium Server |平臺|Driver|平臺版本|Appium 版本|Driver版本| |--------|----------------|------|--------------|--------------| | iOS | [XCUITest](../../drivers/ios-xcuitest.md) | 9.3+ | 1.6.0+ | All | | | [UIAutomation](../../drivers/ios-uiautomation.md) | 8.0 to 9.3 | All | All | | Android | [Espresso](../../drivers/android-espresso.md) | ?+ | 1.9.0+ | All | | | [UiAutomator2](../../drivers/android-uiautomator2.md) | ?+ | 1.6.0+ | All | | | [UiAutomator](../../drivers/android-uiautomator.md) | 4.3+ | All | All | | Mac | [Mac](../../drivers/mac.md) | ?+ | 1.6.4+ | All | | Windows | [Windows](../../drivers/windows.md) | 10+ | 1.6.0+ | All | ### Appium 客戶端 |語言|支持|文檔| |--------|-------|-------------| |[Java](https://github.com/appium/java-client/releases/latest)| All | [appium.github.io](https://appium.github.io/java-client/io/appium/java_client/TouchAction.html) | |[Python](https://github.com/appium/python-client/releases/latest)| All | [appium.github.io](https://appium.github.io/python-client-sphinx/webdriver.common.html#module-webdriver.common.touch_action) | |[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | | |[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/admc/wd/blob/master/lib/commands.js#L1546) | |[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/github/appium/ruby_lib/Appium/TouchAction) | |[PHP](https://github.com/appium/php-client/releases/latest)| All | [github.com](https://github.com/appium/php-client/) | |[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| All | [github.com](https://github.com/appium/appium-dotnet-driver/blob/master/src/Appium.Net/Appium/MultiAction/TouchAction.cs) | ## HTTP API 規范 ### 終端 `POST /session/:session_id/touch/perform` ### URL 參數 |名稱|描述| |----|-----------| |session_id|將指令發往的會話(session)的ID| ### JSON 參數 |名稱|類型|描述| |----|----|-----------| | action | `string` | 需要執行的動作類型 (moveTo\|release\|press\|tap\|wait) | | options | `object` | 動作參數 | | opts.element | `string` | 元素的ID | | opts.x | `number` | 操作的X坐標(相對于左上角) | | opts.y | `number` | 操作的Y坐標(相對于左上角) | | opts.count | `number` | Tap次數 | ### 響應 null ## 參考 * [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L345)
                  <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>

                              哎呀哎呀视频在线观看