跳到正文
cccskills
免费在 GitHub 公开

testdriver:wait

Pause the execution of the script for a specified duration.

中文简介正在准备中。当前显示原文说明。

查看安装方法

包含的文件(1)

  • SKILL.md1.7 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

<!-- Generated from wait.mdx. DO NOT EDIT. -->

Description

The wait method stops the test for a number of milliseconds. Then it continues. Use this to add delays between actions, to wait for animations to complete, or to let state changes become stable.

Syntax

await testdriver.wait(timeout);

Arguments

ArgumentTypeDefaultDescription
timeoutnumber3000The duration in milliseconds to wait.

Examples

// Wait 2 seconds for an animation to complete
await testdriver.find('submit button').click();
await testdriver.wait(2000);

// Wait 5 seconds
await testdriver.wait(5000);

// Wait with default timeout (3 seconds)
await testdriver.wait();

Best Practices

  • Use it for simple delays. Wait for animations, transitions, or state changes after an action.
  • Do not use it to wait for an element. If you wait for a specific element to show, use find() with a timeout option:
    // ✅ Better for waiting for elements
    const element = await testdriver.find('success message', { timeout: 30000 });
    
    // ❌ Don't do this for element waiting
    await testdriver.wait(5000);
    const element = await testdriver.find('success message');
    
  • Do not use very long timeouts. This keeps the tests efficient.
  • Use it only when necessary. The TestDriver redraw detection waits automatically for the screen and the network to become stable after each action.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

How the TestDriver agent behaves on GitHub issues, pull requests, and @mentions

中文简介正在准备中。当前显示原文说明。

testdriverai/testdriverai4732026年9月21日 更新

Execute natural language tasks using AI

中文简介正在准备中。当前显示原文说明。

testdriverai/testdriverai4732026年9月21日 更新

Make AI-powered assertions about screen state

中文简介正在准备中。当前显示原文说明。

testdriverai/testdriverai4732026年9月21日 更新

Deploy TestDriver on your AWS infrastructure using CloudFormation

中文简介正在准备中。当前显示原文说明。

testdriverai/testdriverai4732026年9月21日 更新

Speed up tests with screenshot-based caching

中文简介正在准备中。当前显示原文说明。

testdriverai/testdriverai4732026年9月21日 更新

How TestDriver learns your app and caches what it discovers for instant, deterministic replays

中文简介正在准备中。当前显示原文说明。

testdriverai/testdriverai4732026年9月21日 更新

查看 testdriverai 的全部技能

报告此技能的问题