uncheck([options])
Caution
This feature has known issues. For details, refer to #471.
Unselect the input
checkbox.
Returns
Type | Description |
---|---|
Promise<void> | A Promise that fulfills when the uncheck action is finished. |
Example
import { browser } from 'k6/browser';
export const options = {
scenarios: {
browser: {
executor: 'shared-iterations',
options: {
browser: {
type: 'chromium',
},
},
},
},
};
export default async function () {
const page = await browser.newPage();
await page.goto('http://test.k6.io/browser.php');
const checkbox = page.locator('#checkbox1');
await checkbox.check();
await checkbox.uncheck();
}