|
| 1 | +--- |
| 2 | +title: 'uncheck(selector[, options])' |
| 3 | +description: 'Browser module: frame.uncheck(selector[, options]) method' |
| 4 | +--- |
| 5 | + |
| 6 | +# uncheck(selector[, options]) |
| 7 | + |
| 8 | +{{% admonition type="warning" %}} |
| 9 | + |
| 10 | +Use locator-based [`locator.uncheck([options])`](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/locator/uncheck/) instead. |
| 11 | + |
| 12 | +{{% /admonition %}} |
| 13 | + |
| 14 | +This method is used to unselect an input checkbox. |
| 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.force | boolean | `false` | Setting this to `true` will bypass the actionability checks (`visible`, `stable`, `enabled`). | |
| 23 | +| options.noWaitAfter | boolean | `false` | If set to `true` and a navigation occurs from performing this action, it will not wait for it to complete. | |
| 24 | +| options.position | object | `null` | A point to use relative to the top left corner of the element. If not supplied, a visible point of the element is used. | |
| 25 | +| options.position.x | number | `0` | The x coordinate. | |
| 26 | +| options.position.y | number | `0` | The y coordinate. | |
| 27 | +| 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. | |
| 28 | +| 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/). | |
| 29 | +| options.trial | boolean | `false` | Setting this to `true` will perform the actionability checks without performing the action. | |
| 30 | + |
| 31 | +</TableWithNestedRows> |
| 32 | + |
| 33 | +### Returns |
| 34 | + |
| 35 | +| Type | Description | |
| 36 | +| --------------- | ------------------------------------------------------- | |
| 37 | +| `Promise<void>` | A Promise that fulfills when the checkbox is unchecked. | |
0 commit comments