Skip to content

Commit 5136b3d

Browse files
chore: remove broken link to setChecked page (#1664)
1 parent befc5e7 commit 5136b3d

File tree

2 files changed

+7
-19
lines changed
  • docs/sources
    • next/javascript-api/k6-browser/elementhandle
    • v0.52.x/javascript-api/k6-browser/elementhandle

2 files changed

+7
-19
lines changed

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

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ weight: 04
3838
| [scrollIntoViewIfNeeded([options])](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/elementhandle/scrollintoviewifneeded) | Scrolls the element into view if needed. |
3939
| [selectOption(values[, options])](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/elementhandle/selectoption) | Selects the `select` element's one or more options which match the values. |
4040
| [selectText([options])](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/elementhandle/selecttext) | Selects the text of the element. |
41-
| [setChecked(checked[, options])](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/elementhandle/setchecked) | Sets the `checkbox` or `radio` input element's value to the specified checked or unchecked state. |
41+
| setChecked(checked[, options]) | Sets the `checkbox` or `radio` input element's value to the specified checked or unchecked state. |
4242
| [setInputFiles(file[, options])](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/elementhandle/setinputfiles) | Sets the file input element's value to the specified files. |
4343
| [tap(options)](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/elementhandle/tap) | Taps the element. |
4444
| [textContent()](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/elementhandle/textcontent) | Returns the text content of the element. |
@@ -49,8 +49,6 @@ weight: 04
4949

5050
## Examples
5151

52-
{{< code >}}
53-
5452
```javascript
5553
import { check } from 'k6';
5654
import { browser } from 'k6/browser';
@@ -84,7 +82,7 @@ export default async function () {
8482
const submitButton = await page.$('input[type="submit"]');
8583

8684
await Promise.all([page.waitForNavigation(), submitButton.click()]);
87-
const text = await p.$('h2');
85+
const text = await page.$('h2');
8886
const content = await text.textContent();
8987
check(page, {
9088
header: () => text == 'Welcome, admin!',
@@ -95,9 +93,7 @@ export default async function () {
9593
}
9694
```
9795

98-
{{< /code >}}
99-
100-
{{< code >}}
96+
<!-- eslint-skip -->
10197

10298
```javascript
10399
import { browser } from 'k6/browser';
@@ -167,5 +163,3 @@ export default function () {
167163
}
168164
}
169165
```
170-
171-
{{< /code >}}

docs/sources/v0.52.x/javascript-api/k6-browser/elementhandle/_index.md

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ weight: 04
3838
| [scrollIntoViewIfNeeded([options])](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/elementhandle/scrollintoviewifneeded) | Scrolls the element into view if needed. |
3939
| [selectOption(values[, options])](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/elementhandle/selectoption) | Selects the `select` element's one or more options which match the values. |
4040
| [selectText([options])](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/elementhandle/selecttext) | Selects the text of the element. |
41-
| [setChecked(checked[, options])](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/elementhandle/setchecked) | Sets the `checkbox` or `radio` input element's value to the specified checked or unchecked state. |
41+
| setChecked(checked[, options]) | Sets the `checkbox` or `radio` input element's value to the specified checked or unchecked state. |
4242
| [setInputFiles(file[, options])](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/elementhandle/setinputfiles) | Sets the file input element's value to the specified files. |
4343
| [tap(options)](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/elementhandle/tap) | Taps the element. |
4444
| [textContent()](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/elementhandle/textcontent) | Returns the text content of the element. |
@@ -49,8 +49,6 @@ weight: 04
4949

5050
## Examples
5151

52-
{{< code >}}
53-
5452
```javascript
5553
import { check } from 'k6';
5654
import { browser } from 'k6/browser';
@@ -84,7 +82,7 @@ export default async function () {
8482
const submitButton = await page.$('input[type="submit"]');
8583

8684
await Promise.all([page.waitForNavigation(), submitButton.click()]);
87-
const text = await p.$('h2');
85+
const text = await page.$('h2');
8886
const content = await text.textContent();
8987
check(page, {
9088
header: () => text == 'Welcome, admin!',
@@ -95,13 +93,11 @@ export default async function () {
9593
}
9694
```
9795

98-
{{< /code >}}
99-
100-
{{< code >}}
96+
<!-- eslint-skip -->
10197

10298
```javascript
103-
import { browser } from 'k6/browser';
10499
import { check } from 'k6';
100+
import { browser } from 'k6/browser';
105101

106102
export const options = {
107103
scenarios: {
@@ -167,5 +163,3 @@ export default function () {
167163
}
168164
}
169165
```
170-
171-
{{< /code >}}

0 commit comments

Comments
 (0)