testdriverextractlisted
Install: claude install-skill testdriverai/testdriverai
<!-- Generated from extract.mdx. DO NOT EDIT. -->
## Overview
Extract information from the current screen using AI and return it as a string. Describe what you want in natural language, and the AI reads the screen and returns the matching value — text, numbers, labels, status messages, or any other on-screen content.
Unlike [`assert()`](/v7/assert), which returns a boolean verdict, `extract()` returns the actual value so you can store it, compare it, or feed it into later steps and framework assertions.
## Syntax
```javascript
const value = await testdriver.extract(description)
const value = await testdriver.extract({ description })
```
## Parameters
<ParamField path="description" type="string" required>
Natural language description of the information to read from the screen.
</ParamField>
<Info>
`extract()` also accepts an options object — `extract({ description })` — which is equivalent to the positional form. The bare string form is the most common.
</Info>
## Returns
`Promise<string>` — The information read from the screen. Returns the extracted value as text; parse or cast it yourself if you need a number or other type.
## Examples
### Basic Extraction
```javascript
// Read text content
const title = await testdriver.extract('the page title');
const heading = await testdriver.extract('the main heading text');
// Read numbers and prices
const price = await testdriver.extract('the total price shown in the cart');
const count = await testdriver.extract('th