Skip to content

Commit 95398b1

Browse files
committed
docs: add return subheadings
1 parent f2f468d commit 95398b1

26 files changed

+150
-6
lines changed

src/data/markdown/docs/02 javascript api/07 k6-experimental/01 browser/10 Page.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ Page provides methods to interact with a single tab in a running web browser. A
1919
| [page.$$(selector)](/javascript-api/k6-experimental/browser/page/page-$$/) | Finds all elements matching the specified `selector` within the page. |
2020
| [page.emulateMedia([options])](/javascript-api/k6-experimental/browser/page/emulatemedia/) | Changes the CSS media type and the color scheme feature. |
2121
| [page.emulateVisionDeficiency(type)](/javascript-api/k6-experimental/browser/page/emulatevisiondeficiency/) | Emulates your website with the specified vision deficiency `type`. |
22-
| [page.evaluate(pageFunction[, arg])](/javascript-api/k6-experimental/browser/page/evaluate/) | Returns the value of the pageFunction invocation. |
23-
| [page.evaluateHandle(pageFunction[, arg])](/javascript-api/k6-experimental/browser/page/evaluate/) | Returns the value of the pageFunction invocation as a [JSHandle](javascript-api/k6-experimental/browser/jshandle/). |
22+
| [page.evaluate(pageFunction[, arg])](/javascript-api/k6-experimental/browser/page/evaluate/) | Returns the value of the `pageFunction` invocation. |
23+
| [page.evaluateHandle(pageFunction[, arg])](/javascript-api/k6-experimental/browser/page/evaluate/) | Returns the value of the `pageFunction` invocation as a [JSHandle](javascript-api/k6-experimental/browser/jshandle/). |
2424
| [page.fill(selector, value[, options])](/javascript-api/k6-experimental/browser/page/fill/) | Fill an `input`, `textarea` or `contenteditable` element with the provided value. |
2525
| [page.focus(selector[, options])](/javascript-api/k6-experimental/browser/page/focus/) | Fetches an element with `selector` and focuses on it. |
2626
| [page.frames()](/javascript-api/k6-experimental/browser/page/frames/) | Returns an array of frames on the page. |
@@ -31,7 +31,7 @@ Page provides methods to interact with a single tab in a running web browser. A
3131
| [page.innerText(selector[, options])](/javascript-api/k6-experimental/browser/page/innertext/) | Returns the `element.innerText`. |
3232
| [page.inputValue(selector[, options])](/javascript-api/k6-experimental/browser/page/inputvalue/) | Returns `input.value` for the selected `input`, `textarea` or `select` element. |
3333
| [page.isChecked(selector[, options])](/javascript-api/k6-experimental/browser/page/ischecked/) | Checks to see if the `checkbox` `input` type is selected or not. |
34-
| [page.isClosed()](/javascript-api/k6-experimental/browser/page/isclosed/) | Checks if the page has been closed. |
34+
| [page.isClosed()](/javascript-api/k6-experimental/browser/page/isclosed/) <BWIPT id="878"/> | Checks if the page has been closed. |
3535
| [page.isDisabled(selector[, options])](/javascript-api/k6-experimental/browser/page/isdisabled/) | Checks if the element is `disabled`. |
3636
| [page.isEditable(selector[, options])](/javascript-api/k6-experimental/browser/page/iseditable/) | Checks if the element is `editable`. |
3737
| [page.isEnabled(selector[, options])](/javascript-api/k6-experimental/browser/page/isenabbled/) | Checks if the element is `enabled`. |
@@ -60,7 +60,7 @@ Page provides methods to interact with a single tab in a running web browser. A
6060
| [page.url()](/javascript-api/k6-experimental/browser/page/url/) | Returns the `page`'s URL. |
6161
| [page.viewportSize()](/javascript-api/k6-experimental/browser/page/viewportsize/) | Returns the `page`'s size (width and height). |
6262
| [page.waitForFunction(pageFunction, arg[, options])](/javascript-api/k6-experimental/browser/page/waitforfunction/) | Returns when the `pageFunction` returns a truthy value. |
63-
| [page.waitForLoadState(state[, options])](/javascript-api/k6-experimental/browser/page/waitforloadstate/) | Waits for the given load `state` to be reached. |
63+
| [page.waitForLoadState(state[, options])](/javascript-api/k6-experimental/browser/page/waitforloadstate/) <BWIPT id="880"/> | Waits for the given load `state` to be reached. |
6464
| [page.waitForNavigation([options])](/javascript-api/k6-experimental/browser/page/waitfornavigation/) | Waits for the given navigation lifecycle event to occur and returns the main resource response. |
6565
| [page.waitForSelector(selector[, options])](/javascript-api/k6-experimental/browser/page/waitforselector/) | Returns when element specified by selector satisfies `state` option. |
6666
| [page.waitForTimeout(timeout)](/javascript-api/k6-experimental/browser/page/waitfortimeout/) | Waits for the given `timeout` in milliseconds. |

src/data/markdown/docs/02 javascript api/07 k6-experimental/01 browser/10 Page/click--options--.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ This method clicks on an element matching a `selector`.
3232

3333
</TableWithNestedRows>
3434

35+
### Returns
36+
37+
| Type | Description |
38+
| ---- | ----------- |
39+
| Promise | An asynchronous operation that doesn't return a value. |
40+
3541
### Example
3642

3743
<CodeGroup labels={["Click action without navigation"]}>

src/data/markdown/docs/02 javascript api/07 k6-experimental/01 browser/10 Page/content.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ excerpt: 'Browser module: page.content method'
55

66
Gets the HTML contents of the page.
77

8+
### Returns
9+
10+
| Type | Description |
11+
| ---- | ----------- |
12+
| string | The HTML contents of the page. |
13+
814
### Example
915

1016
<CodeGroup labels={[]}>

src/data/markdown/docs/02 javascript api/07 k6-experimental/01 browser/10 Page/context.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ excerpt: 'Browser module: page.context method'
55

66
Gets the [BrowserContext](/javascript-api/k6-experimental/browser/browsercontext/) that the page belongs to.
77

8+
### Returns
9+
10+
| Type | Description |
11+
| ---- | ----------- |
12+
| [BrowserContext](/javascript-api/k6-experimental/browser/browsercontext/) | The `BrowserContext` that the page belongs to. |
13+
814
### Example
915

1016
<CodeGroup labels={[]}>

src/data/markdown/docs/02 javascript api/07 k6-experimental/01 browser/10 Page/dollar--options--.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ Use locator-based [`page.locator(selector)`](/javascript-api/k6-experimental/bro
1111

1212
The method finds an element matching the specified selector within the page. If no elements match the selector, the return value resolves to `null`. To wait for an element on the page, use [locator.waitFor([options])](/javascript-api/k6-experimental/browser/locator/waitfor/).
1313

14+
### Returns
15+
16+
| Type | Description |
17+
| ---- | ----------- |
18+
| null or [ElementHandle](javascript-api/k6-experimental/browser/keyboard/) | Returns `ElementHandle` when a matching element is found. Else, it returns `null`. |
19+
1420
### Example
1521

1622
<CodeGroup labels={[]}>

src/data/markdown/docs/02 javascript api/07 k6-experimental/01 browser/10 Page/doubledollar--options--.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ Use locator-based [`page.locator(selector)`](/javascript-api/k6-experimental/bro
1111

1212
The method finds all elements matching the specified selector within the page. If no elements match the selector, the return value resolves to `[]`.
1313

14+
### Returns
15+
16+
| Type | Description |
17+
| ---- | ----------- |
18+
| null or [ElementHandle](javascript-api/k6-experimental/browser/keyboard/)[] | Returns an array of `ElementHandle` when multiple elements are found. Else, it returns `null`. |
19+
1420
### Example
1521

1622
<CodeGroup labels={[]}>

src/data/markdown/docs/02 javascript api/07 k6-experimental/01 browser/10 Page/evaluate.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ Returns the value of the `pageFunction` invocation.
1414

1515
</TableWithNestedRows>
1616

17+
### Returns
18+
19+
| Type | Description |
20+
| ---- | ----------- |
21+
| any | The value of the `pageFunction` invocation. |
22+
1723
### Example
1824

1925
<CodeGroup labels={[]}>

src/data/markdown/docs/02 javascript api/07 k6-experimental/01 browser/10 Page/evaluateHandle.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@ The only difference between `page.evaluate()` and `page.evaluateHandle()` is tha
1616

1717
</TableWithNestedRows>
1818

19+
### Returns
20+
21+
| Type | Description |
22+
| ---- | ----------- |
23+
| [JSHandle](/javascript-api/k6-experimental/browser/jshandle/) | The `JSHandle` instance associated with the page. |
24+
25+
1926
### Example
2027

2128
<CodeGroup labels={[]}>

src/data/markdown/docs/02 javascript api/07 k6-experimental/01 browser/10 Page/frames.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,13 @@ title: 'frames()'
33
excerpt: 'Browser module: page.frames method'
44
---
55

6-
Returns an array of frames on the page.
6+
Returns an array of [Frames](/javascript-api/k6-experimental/browser/frame/) on the page.
7+
8+
### Returns
9+
10+
| Type | Description |
11+
| ---- | ----------- |
12+
| [Frames](/javascript-api/k6-experimental/browser/frame/)[] | An array of `Frames` associated with the page. |
713

814
### Example
915

src/data/markdown/docs/02 javascript api/07 k6-experimental/01 browser/10 Page/getattribute--options--.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Returns the element attribute value for the given attribute name.
2727

2828
| Type | Description |
2929
|--------|-------------------------------------|
30-
| string | The value of the attribute or null. |
30+
| null or string | The value of the attribute. Else, it returns `null`. |
3131

3232
### Example
3333

0 commit comments

Comments
 (0)