Documentation Index
Fetch the curated documentation index at: https://grafana_com_website/llms.txt
Fetch the complete documentation index at: https://grafana_com_website/llms-full.txt
Use this file to discover all available pages before exploring further.
STOP! If you are an AI agent or LLM, read this before continuing. This is the HTML version of a Grafana documentation page. Always request the Markdown version instead - HTML wastes context. Get this page as Markdown: /docs/k6/latest/javascript-api/k6-browser/framelocator.md (append .md) or send Accept: text/markdown to /docs/k6/latest/javascript-api/k6-browser/framelocator/. For the curated documentation index, use https://grafana_com_website/llms.txt. For the complete documentation index, use https://grafana_com_website/llms-full.txt.
FrameLocator
FrameLocator represents a way to find element(s) in an iframe. Frames can be nested, and this locator supports selecting a frame element and then working with it.
A FrameLocator can be created with the page.frameLocator(selector) method or the locator.contentFrame() method.
| Method | Description |
|---|---|
| frameLocator(selector) | Returns a
FrameLocator for a nested iframe matching the given selector within this frame. |
| getByAltText(altText[, options]) | Returns a locator for elements with the specified alt attribute text. |
| getByLabel(text[, options]) | Returns a locator for form controls with the specified label text. |
| getByPlaceholder(placeholder[, options]) | Returns a locator for input elements with the specified placeholder attribute text. |
| getByRole(role[, options]) | Returns a locator for elements with the specified ARIA role. |
| getByTestId(testId) | Returns a locator for elements with the specified data-testid attribute. |
| getByText(text[, options]) | Returns a locator for elements containing the specified text. |
| getByTitle(title[, options]) | Returns a locator for elements with the specified title attribute. |
| locator(selector[, options]) | Returns a new chained locator for the given selector within the frame. |
Was this page helpful?
Related resources from Grafana Labs

