Skip to content

Commit 721beb2

Browse files
committed
Add getBy* APIs to page's index page
1 parent c4fa02f commit 721beb2

File tree

1 file changed

+7
-0
lines changed
  • docs/sources/k6/next/javascript-api/k6-browser/page

1 file changed

+7
-0
lines changed

docs/sources/k6/next/javascript-api/k6-browser/page/_index.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,13 @@ Page provides methods to interact with a single tab in a running web browser. A
2828
| [focus(selector[, options])](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/page/focus/) | Fetches an element with `selector` and focuses on it. |
2929
| [frames()](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/page/frames) | Returns an array of frames on the page. |
3030
| [getAttribute(selector, name[, options])](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/page/getattribute/) | Returns the element attribute value for the given attribute name. |
31+
| [getByAltText(altText[, options])](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/page/getbyalttext/) | Returns a locator for elements with the specified `alt` attribute text. |
32+
| [getByLabel(text[, options])](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/page/getbylabel/) | Returns a locator for form controls with the specified label text. |
33+
| [getByPlaceholder(placeholder[, options])](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/page/getbyplaceholder/) | Returns a locator for input elements with the specified `placeholder` attribute text. |
34+
| [getByRole(role[, options])](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/page/getbyrole/) | Returns a locator for elements with the specified ARIA role. |
35+
| [getByTestId(testId)](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/page/getbytestid/) | Returns a locator for elements with the specified `data-testid` attribute. |
36+
| [getByText(text[, options])](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/page/getbytext/) | Returns a locator for elements containing the specified text. |
37+
| [getByTitle(title[, options])](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/page/getbytitle/) | Returns a locator for elements with the specified `title` attribute. |
3138
| [goto(url[, options])](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/page/goto/) | Navigates to the specified `url`. |
3239
| [hover(selector[, options])](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/page/hover/) | Hovers over an element matching `selector`. |
3340
| [innerHTML(selector[, options])](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/page/innerhtml/) | Returns the `element.innerHTML`. |

0 commit comments

Comments
 (0)