Skip to content

Commit bde02d9

Browse files
inancgumusschalksnyman
authored andcommitted
Async frame.locator
1 parent e73c0ce commit bde02d9

File tree

1 file changed

+18
-0
lines changed
  • docs/sources/next/javascript-api/k6-browser/frame

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
title: 'locator(selector)'
3+
description: 'Browser module: frame.locator(selector) method'
4+
---
5+
6+
# locator(selector)
7+
8+
The method returns an element [Locator](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/locator/). Locators resolve to the element when the action takes place, which means locators can span over navigations where the underlying dom changes.
9+
10+
| Parameter | Type | Default | Description |
11+
| --------- | ------ | ------- | --------------------------------------------- |
12+
| selector | string | `''` | A selector to use when resolving DOM element. |
13+
14+
### Returns
15+
16+
| Type | Description |
17+
| -------------------------------------------------------------------------------------- | ------------------------------------------------ |
18+
| [Locator](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/locator/) | The element `Locator` associated with the frame. |

0 commit comments

Comments
 (0)