Skip to content

Commit f190835

Browse files
inancgumusschalksnyman
authored andcommitted
Async frame.isChecked
1 parent 01d9ad8 commit f190835

File tree

1 file changed

+31
-0
lines changed
  • docs/sources/next/javascript-api/k6-browser/frame

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: 'isChecked(selector[, options])'
3+
description: 'Browser module: frame.isChecked(selector[, options]) method'
4+
---
5+
6+
# isChecked(selector[, options])
7+
8+
{{% admonition type="warning" %}}
9+
10+
Use locator-based [`locator.isChecked([options])`](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/locator/ischecked/) instead.
11+
12+
{{% /admonition %}}
13+
14+
Checks to see if the `checkbox` `input` type is selected or not.
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<bool>` | A Promise that fullfils with `true` if the checkbox is selected, else `false`. |

0 commit comments

Comments
 (0)