Skip to content

Commit b9535a3

Browse files
committed
small fixes from self review
1 parent 698cd91 commit b9535a3

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@ Locator can be created with the [page.locator(selector[, options])](https://graf
3030
| [first()](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/locator/first) | Returns a `locator` to the first matching element. |
3131
| [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. |
3232
| [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. |
33-
| [getByAltText(altText[, options])](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/frame/getbyalttext/) | Returns a locator for elements with the specified `alt` attribute text. |
34-
| [getByLabel(text[, options])](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/frame/getbylabel/) | Returns a locator for form controls with the specified label text. |
35-
| [getByPlaceholder(placeholder[, options])](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/frame/getbyplaceholder/) | Returns a locator for input elements with the specified `placeholder` attribute text. |
36-
| [getByRole(role[, options])](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/frame/getbyrole/) | Returns a locator for elements with the specified ARIA role. |
37-
| [getByTestId(testId)](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/frame/getbytestid/) | Returns a locator for elements with the specified `data-testid` attribute. |
38-
| [getByText(text[, options])](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/frame/getbytext/) | Returns a locator for elements containing the specified text. |
39-
| [getByTitle(title[, options])](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/frame/getbytitle/) | Returns a locator for elements with the specified `title` attribute. |
33+
| [getByAltText(altText[, options])](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/locator/getbyalttext/) | Returns a locator for elements with the specified `alt` attribute text. |
34+
| [getByLabel(text[, options])](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/locator/getbylabel/) | Returns a locator for form controls with the specified label text. |
35+
| [getByPlaceholder(placeholder[, options])](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/locator/getbyplaceholder/) | Returns a locator for input elements with the specified `placeholder` attribute text. |
36+
| [getByRole(role[, options])](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/locator/getbyrole/) | Returns a locator for elements with the specified ARIA role. |
37+
| [getByTestId(testId)](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/locator/getbytestid/) | Returns a locator for elements with the specified `data-testid` attribute. |
38+
| [getByText(text[, options])](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/locator/getbytext/) | Returns a locator for elements containing the specified text. |
39+
| [getByTitle(title[, options])](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/locator/getbytitle/) | Returns a locator for elements with the specified `title` attribute. |
4040
| [hover([options])](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/locator/hover) {{< docs/bwipt id="471" >}} | Hovers over the element. |
4141
| [innerHTML([options])](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/locator/innerhtml) | Returns the `element.innerHTML`. |
4242
| [innerText([options])](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/locator/innertext) | Returns the `element.innerText`. |

docs/sources/k6/next/javascript-api/k6-browser/locator/getbyalttext.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export default async function () {
3535
try {
3636
await page.goto('https://quickpizza.grafana.com');
3737

38-
const logo = page.locator('document').getByAltText('LOGO');
38+
const logo = page.locator(':root').getByAltText('LOGO');
3939
await logo.waitFor();
4040

4141
await logo.click();

0 commit comments

Comments
 (0)