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

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                [//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/web/execute-async.yml) # 執行異步腳本 在頁面中注入一段JavaScript,以便在當前選定框架的上下文中執行 (僅是 Web context ) [//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/web/execute-async.yml) ## 用法示例 ```java // Java ((JavascriptExecutor) driver).executeAsyncScript("window.setTimeout(arguments[arguments.length - 1], 500);"); ``` ```python # Python self.driver.execute_async_script(‘document.title’) ``` ```javascript // Javascript // webdriver.io example driver.setAsyncTimeout(5000) var result = browser.executeAsync(function(a, b, c, d, done) { // browser context - you may access neither client nor console setTimeout(function() { done(a + b + c + d); }, 3000); }, 1, 2, 3, 4) // node.js context - client and console are available console.log(result); // outputs: 10 // wd example await driver.safeExecuteAsync('document.title'); ``` ```ruby # Ruby # ruby_lib example execute_async_script("document.title") # ruby_lib_core example @driver.execute_async_script("document.title") ``` ```php # PHP // TODO PHP sample ``` ```csharp // C# // TODO C# sample ``` [//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/web/execute-async.yml) ## 描述 假定執行的腳本是異步的并且必須在調用提供的回調結束后發出信號, 始終作為函數的最后一個參數提供。該回調的值將返回給客戶端。 異步腳本命令可能不會跨頁面加載,如果在等待腳本結果時觸發了卸載事件,錯誤將返回給客戶端。 腳本參數定義腳本以函數體形式執行,函數將會調用提供的參數數組并且可以按指定的順序通過arguments對象訪問值。 最后一個參數始終是一個回調函數,且必須調用該回調函數表明腳本已執行完成。 參數可以是任意 JSON的基本類型、 數組、 或者 JSON 對象, 定義WebElement引用的JSON對象將轉換為相應的DOM元素。 同樣,腳本結果中的任何WebElements都將作為WebElement JSON對象返回給客戶端。 [//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/web/execute-async.yml) ## 支持 [//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/web/execute-async.yml) ### Appium Server |平臺|Driver|平臺版本|Appium版本|Driver版本| |--------|----------------|------|--------------|--------------| | iOS | [XCUITest](../../drivers/ios-xcuitest.md) | None | None | None | | | [UIAutomation](../../drivers/ios-uiautomation.md) | None | None | None | | Android | [UiAutomator2](../../drivers/android-uiautomator2.md) | None | None | None | | | [Espresso](../../drivers/android-espresso.md) | None | None | None | | | [UiAutomator](../../drivers/android-uiautomator.md) | None | None | None | | Mac | [Mac](../../drivers/mac.md) | None | None | None | | Windows | [Windows](../../drivers/windows.md) | None | None | None | [//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/web/execute-async.yml) ### Appium Clients |語言|支持版本|文檔| |--------|-------|-------------| |[Java](https://github.com/appium/java-client/releases/latest)| None | [seleniumhq.github.io](https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/remote/RemoteWebDriver.html#executeAsyncScript-java.lang.String-java.lang.Object...-) | |[Python](https://github.com/appium/python-client/releases/latest)| None | [selenium-python.readthedocs.io](http://selenium-python.readthedocs.io/api.html#selenium.webdriver.remote.webdriver.WebDriver.execute_async_script) | |[Javascript (WebdriverIO)](http://webdriver.io/index.html)| None | | |[Javascript (WD)](https://github.com/admc/wd/releases/latest)| None | [github.com](https://github.com/admc/wd/blob/master/lib/commands.js#L182) | |[Ruby](https://github.com/appium/ruby_lib/releases/latest)| None | [www.rubydoc.info](https://www.rubydoc.info/gems/selenium-webdriver/Selenium/WebDriver/Driver:execute_async_script) | |[PHP](https://github.com/appium/php-client/releases/latest)| None | [github.com](https://github.com/appium/php-client/) | |[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| None | [github.com](https://github.com/appium/appium-dotnet-driver/) | [//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/web/execute-async.yml) ## HTTP API 規范 [//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/web/execute-async.yml) ### 路徑 `POST /session/:session_id/execute_async` [//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/web/execute-async.yml) ### URL 參數 |名稱|描述| |----|-----------| |session_id|將指令發往的會話(session)的ID| [//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/web/execute-async.yml) ### JSON 參數 |名稱|類型|描述| |----|----|-----------| | script | `string` | 執行腳本 | | args | `array` | 腳本參數 | [//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/web/execute-async.yml) ### 響應 腳本結果 (`any`) [//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/web/execute-async.yml) ## 參考 * [W3C Specification](https://www.w3.org/TR/webdriver/#dfn-execute-async-script) * [JSONWP Specification](https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidexecute_async)
                  <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>

                              哎呀哎呀视频在线观看