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: src/data/markdown/docs/02 javascript api/07 k6-experimental/01 browser/10 Page.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,8 +19,8 @@ Page provides methods to interact with a single tab in a running web browser. A
19
19
|[page.$$(selector)](/javascript-api/k6-experimental/browser/page/page-$$/) | Finds all elements matching the specified `selector` within the page. |
20
20
|[page.emulateMedia([options])](/javascript-api/k6-experimental/browser/page/emulatemedia/)| Changes the CSS media type and the color scheme feature. |
21
21
|[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/). |
24
24
|[page.fill(selector, value[, options])](/javascript-api/k6-experimental/browser/page/fill/)| Fill an `input`, `textarea` or `contenteditable` element with the provided value. |
25
25
|[page.focus(selector[, options])](/javascript-api/k6-experimental/browser/page/focus/)| Fetches an element with `selector` and focuses on it. |
26
26
|[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
31
31
|[page.innerText(selector[, options])](/javascript-api/k6-experimental/browser/page/innertext/)| Returns the `element.innerText`. |
32
32
|[page.inputValue(selector[, options])](/javascript-api/k6-experimental/browser/page/inputvalue/)| Returns `input.value` for the selected `input`, `textarea` or `select` element. |
33
33
|[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/)<BWIPTid="878"/> | Checks if the page has been closed. |
35
35
|[page.isDisabled(selector[, options])](/javascript-api/k6-experimental/browser/page/isdisabled/)| Checks if the element is `disabled`. |
36
36
|[page.isEditable(selector[, options])](/javascript-api/k6-experimental/browser/page/iseditable/)| Checks if the element is `editable`. |
37
37
|[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
60
60
|[page.url()](/javascript-api/k6-experimental/browser/page/url/)| Returns the `page`'s URL. |
61
61
|[page.viewportSize()](/javascript-api/k6-experimental/browser/page/viewportsize/)| Returns the `page`'s size (width and height). |
62
62
|[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/)<BWIPTid="880"/> | Waits for the given load `state` to be reached. |
64
64
|[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. |
65
65
|[page.waitForSelector(selector[, options])](/javascript-api/k6-experimental/browser/page/waitforselector/)| Returns when element specified by selector satisfies `state` option. |
66
66
|[page.waitForTimeout(timeout)](/javascript-api/k6-experimental/browser/page/waitfortimeout/)| Waits for the given `timeout` in milliseconds. |
Copy file name to clipboardExpand all lines: src/data/markdown/docs/02 javascript api/07 k6-experimental/01 browser/10 Page/dollar--options--.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,12 @@ Use locator-based [`page.locator(selector)`](/javascript-api/k6-experimental/bro
11
11
12
12
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/).
13
13
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`. |
Copy file name to clipboardExpand all lines: src/data/markdown/docs/02 javascript api/07 k6-experimental/01 browser/10 Page/doubledollar--options--.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,12 @@ Use locator-based [`page.locator(selector)`](/javascript-api/k6-experimental/bro
11
11
12
12
The method finds all elements matching the specified selector within the page. If no elements match the selector, the return value resolves to `[]`.
13
13
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`. |
0 commit comments