---
title: "$$(selector) | Grafana k6 documentation"
description: "Browser module: frame.$$(selector) method"
---

> For a curated documentation index, see [llms.txt](/llms.txt). For the complete documentation index, see [llms-full.txt](/llms-full.txt).

# $$(selector)

> Warning
> 
> Use locator-based [`frame.locator(selector)`](/docs/k6/latest/javascript-api/k6-browser/frame/locator/) instead.

The method finds all elements matching the specified selector within the page. If no elements match the selector, the return value resolves to `[]`. The results are returned in DOM order.

### Returns

Expand table

| Type                       | Description                                                                                                                                                        |
|----------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `Promise<ElementHandle[]>` | A Promise that fulfills with the [ElementHandle](/docs/k6/latest/javascript-api/k6-browser/elementhandle/) array of the selector when matching elements are found. |
