> For the complete documentation index, see [llms.txt](https://ivory-docs.gitbook.io/ivory/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ivory-docs.gitbook.io/ivory/features/element-capture.md).

# Element Capture

Capture page elements for accurate selectors

Capture elements from any webpage. Ivory extracts selectors and context for rule creation.

## Capture an Element

1. Navigate to any webpage
2. Right-click the element you want to track
3. Select **Capture Element for Ivory**

The element appears in the **Workspace** section under "Page Elements".

## What Gets Captured

| Data         | Example                       |
| ------------ | ----------------------------- |
| CSS Selector | `#submit-btn` or `.hero-cta`  |
| Text Content | "Download Now"                |
| Parent HTML  | Surrounding element structure |
| Page URL     | `https://example.com/page`    |

## Capture Selected Text

Highlight text on any page, right-click, and select **Capture Selection for Ivory**. Useful for capturing specific content or labels.

## Using Captured Elements

Captured elements automatically become context for rule creation:

1. Capture the element you want to track
2. Click **Create**
3. Reference it in your prompt:

```
Create a click tracking rule for the captured button
```

Ivory uses the captured selector in the generated rule.

## Managing Captures

* Captures persist for your browser session
* Click **Clear** in the "Page Elements" subsection header to remove all captures
* Capture multiple elements before creating rules

## Tips

* Capture the exact element users will click (not a parent container)
* For forms, capture the form element itself for submit tracking
* Capture multiple related elements, then create rules for all at once
