Menu
Scroll for more
This is documentation for the next version of Grafana k6 documentation. For the latest stable release, go to the latest version.
Open source
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
Additional helpful documentation, links, and articles:
Video

Performance testing and observability in Grafana Cloud
Optimize user experiences with Grafana Cloud. Learn real-time insights, performance testing with k6, and continuous validation with Synthetic Monitoring.
Events

User-centered observability: load testing, real user monitoring, and synthetics
Learn how to use load testing, synthetic monitoring, and real user monitoring (RUM) to understand end users' experience of your apps. Watch on demand.