Skill240 repo starsupdated 20d ago
testdriver:wait
Pause the execution of the script for a specified duration.
Install in Claude Code
Copygit clone --depth 1 https://github.com/testdriverai/testdriverai /tmp/testdriver-wait && cp -r /tmp/testdriver-wait/ai/skills/testdriver-wait ~/.claude/skills/testdriver-waitThen start a new Claude Code session; the skill loads automatically.
Definition
SKILL.md
<!-- Generated from wait.mdx. DO NOT EDIT. -->
## Description
The `wait` method pauses test execution for a specified number of milliseconds before continuing. This is useful for adding delays between actions, waiting for animations to complete, or pausing for state changes to settle.
## Syntax
```javascript
await testdriver.wait(timeout);
```
## Arguments
| Argument | Type | Default | Description |
| --------- | -------- | ------- | ------------------------------------- |
| `timeout` | `number` | `3000` | The duration in milliseconds to wait. |
## Examples
```javascript
// 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 for simple delays** — waiting for animations, transitions, or state changes after an action.
- **Avoid for element waiting** — if you're waiting for a specific element to appear, use `find()` with a `timeout` option instead:
```javascript
// ✅ 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');
```
- Avoid excessively long timeouts to keep tests efficient.
- Use sparingly — TestDriver's [redraw detection](/v7/performing-actions#waiting-for-dynamic-content) automatically waits for screen and network stability after each action.More from this repository
testdriver:aiSkill
Execute natural language tasks using AI
testdriver:assertSkill
Make AI-powered assertions about screen state
testdriver:aws-setupSkill
Deploy TestDriver on your AWS infrastructure using CloudFormation
testdriver:cacheSkill
Speed up tests with screenshot-based caching
testdriver:cachingSkill
1.7x faster test execution with intelligent caching and optimization
testdriver:captchaSkill
Solve captchas using 2captcha service
testdriver:ci-cdSkill
Run TestDriver tests in CI/CD with parallel execution and cross-platform support
testdriver:clickSkill
Click at specific coordinates or on elements