Skip to content

Commit 01d9ad8

Browse files
inancgumusschalksnyman
authored andcommitted
Async frame.inputValue
1 parent 04043e7 commit 01d9ad8

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
title: 'inputValue(selector[, options])'
3+
description: 'Browser module: frame.inputValue(selector[, options]) method'
4+
---
5+
6+
# inputValue(selector[, options])
7+
8+
{{% admonition type="warning" %}}
9+
10+
Use locator-based [`locator.inputValue([options])`](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/locator/inputvalue/) instead.
11+
12+
{{% /admonition %}}
13+
14+
Returns `input.value` for the selected `input`, `textarea` or `select` element.
15+
16+
<TableWithNestedRows>
17+
18+
| Parameter | Type | Default | Description |
19+
| --------------- | ------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
20+
| selector | string | `''` | A selector to search for an element. If there are multiple elements satisfying the selector, the first will be used. |
21+
| options | object | `null` | |
22+
| options.strict | boolean | `false` | When `true`, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception. |
23+
| options.timeout | number | `30000` | Maximum time in milliseconds. Pass `0` to disable the timeout. Default is overridden by the `setDefaultTimeout` option on [BrowserContext](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/browsercontext/) or [Page](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/page/). |
24+
25+
</TableWithNestedRows>
26+
27+
### Returns
28+
29+
| Type | Description |
30+
| ----------------- | ------------------------------------------------------------ |
31+
| `Promise<string>` | A Promise that fullfils with the input value of the element. |

0 commit comments

Comments
 (0)