> ## Documentation Index
> Fetch the complete documentation index at: https://docs.testdriver.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Performing Actions

> Click, type, hover, scroll and more with TestDriver

## 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 theme={null}
// 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('the total price');
const orderNumber = await testdriver.extract('the order confirmation number');
```

## Chaining Actions

TestDriver supports method chaining for cleaner code:

```javascript theme={null}
// Chain find() with actions
const button = await testdriver.find('submit button').click();
```

Or save element reference for later use:

```javascript theme={null}
const button = await testdriver.find('submit button');
await button.click();
```
