You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/sources/k6/next/javascript-api/k6-browser/locator/_index.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,6 +25,7 @@ Locator can be created with the [page.locator(selector[, options])](https://graf
25
25
|[dblclick([options])](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/locator/dblclick) {{< docs/bwipt id="471" >}} | Mouse double click on the chosen element. |
26
26
|[dispatchEvent(type, eventInit, [options])](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/locator/dispatchevent)| Dispatches HTML DOM event types e.g. `'click'`. |
27
27
|[fill(value, [options])](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/locator/fill)| Fill an `input`, `textarea` or `contenteditable` element with the provided value. |
28
+
|[first()](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/locator/first)| Returns `locator` to the first matching element. |
28
29
|[focus([options])](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/locator/focus)| Calls [focus](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus) on the element, if it can be focused. |
29
30
|[getAttribute(name, [options])](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/locator/getattribute)| Returns the element attribute value for the given attribute name. |
30
31
|[hover([options])](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/locator/hover) {{< docs/bwipt id="471" >}} | Hovers over the element. |
@@ -37,6 +38,8 @@ Locator can be created with the [page.locator(selector[, options])](https://graf
37
38
|[isEnabled([options])](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/locator/isenabled)| Checks if the element is `enabled`. |
38
39
|[isHidden()](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/locator/ishidden)| Checks if the element is `hidden`. |
39
40
|[isVisible()](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/locator/isvisible)| Checks if the element is `visible`. |
41
+
|[last()](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/locator/last)| Returns `locator` to the last matching element. |
42
+
|[nth()](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/locator/nth)| Returns `locator` to the n-th matching element. |
40
43
|[press(key, [options])](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/locator/press)| Press a single key on the keyboard or a combination of keys. |
41
44
|[selectOption(values, [options])](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/locator/selectoption) {{< docs/bwipt id="470" >}} | Select one or more options which match the values. |
42
45
|[setChecked(checked[, options])](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/locator/setchecked)| Sets the `checkbox` or `radio` input element's value to the specified checked or unchecked state. |
0 commit comments