testdriverperforming-actionslisted
Install: claude install-skill testdriverai/testdriverai
<!-- Generated from performing-actions.mdx. DO NOT EDIT. -->
Real apps move, load, and change. Adapt your tests to handle it.
Once you've [generated](/v7/generating-tests) and [learned](/v7/caching) your tests and gotten them [running](/v7/copilot/running-tests), the next challenge is the real world: buttons appear after a spinner, pages navigate, animations play, and content streams in over the network. To keep tests reliable, you need to perform the right actions and handle timing so your tests adapt to how the UI actually behaves instead of breaking.
## Performing Actions
TestDriver provides a variety of actions you can perform, like [clicking](/v7/click), [typing](/v7/type), [hovering](/v7/hover), and [scrolling](/v7/scroll). For a full list, see the [API Reference](/v7/click).
```javascript
// Clicking
await testdriver.find('submit button').click();
await testdriver.find('file item').doubleClick();
await testdriver.find('text area').rightClick();
// Typing
await testdriver.find('email input').type('user@example.com');
await testdriver.find('password input').type('secret', { secret: true });
// Keyboard shortcuts
await testdriver.pressKeys(['enter']);
await testdriver.pressKeys(['ctrl', 'c']);
// Hovering
await testdriver.find('dropdown menu').hover();
// Scrolling
await testdriver.scroll('down', 500);
// Waiting
await testdriver.wait(2000); // Wait 2 seconds for animation/state change
// Extracting information from screen
const price = await testdriver.extract