Appium-Timeouts(超时)

£神魔★判官ぃ 2022-11-17 10:17 268阅读 0赞

Set Timeouts

          • Example Usage
          • Description
          • Support
            • Appium Server
            • Appium Clients
          • HTTP API Specifications
            • Endpoint
            • URL Parameters
            • JSON Parameters
            • Response

Configure the amount of time that a particular type of operation can execute for before they are aborted //配置特定类型的操作在中止之前可以执行的时间量

Example Usage

































Java driver.manage().timeouts().pageLoadTimeout(30, TimeUnit.SECONDS);
Python self.driver.set_page_load_timeout(5000)
Javascript // webdriver.io example
driver.setTimeouts(5000)
// wd example
await driver.setPageLoadTimeout(5000);
Ruby # ruby_lib example
timeout(‘pageLoad’, 5) # Ruby translates it to seconds
# ruby_lib_core example
@driver.timeout(‘pageLoad’, 5) # Ruby translates it to seconds
C# driver.Manage().Timeouts().PageLoad = TimeSpan.FromSeconds(30);
PHP // TODO PHP sample
Description

The types of timeouts are ‘page load’, ‘script’ and ‘implicit’. (The example usage is just ‘page load’) //超时类型为“页面加载”、“脚本”和“隐式”。(示例用法只是“页面加载”)

Support
Appium Server

详见

Appium Clients

详见

HTTP API Specifications
Endpoint

POST /session/:session_id/timeouts

URL Parameters













name description
session_id ID of the session to route the command to
JSON Parameters




















name type description
type string The type of operation to set the timeout for. Valid values are: ‘script’ for script timeouts, ‘implicit’ for modifying the implicit wait timeout and ‘page load’ for setting a page load timeout.
ms number The amount of time, in milliseconds, that time-limited commands are permitted to run
Response

null

发表评论

表情:
评论列表 (有 0 条评论,268人围观)

还没有评论,来说两句吧...

相关阅读