MCPcopy Create free account
hub / github.com/ChromeDevTools/devtools-frontend / setCheckBox

Method setCheckBox

test/e2e/shared/page-wrapper.ts:503–511  ·  view source on GitHub ↗
(selector: string, wantChecked: boolean)

Source from the content-addressed store, hash-verified

501 }
502
503 async setCheckBox(selector: string, wantChecked: boolean) {
504 const checkbox = await this.waitFor<HTMLInputElement>(selector);
505 const checked = await checkbox.evaluate(box => box.checked);
506 if (checked !== wantChecked) {
507 await this.click(`${selector} + label`);
508 }
509 assert.strictEqual(
510 await checkbox.evaluate(box => box.checked), wantChecked, `Expected checkbox to be ${wantChecked}`);
511 }
512}

Callers 6

toggleIgnoreListingFunction · 0.80
setPersistLogFunction · 0.80
setCacheDisabledFunction · 0.80
setInvertFunction · 0.80

Calls 2

clickMethod · 0.95
evaluateMethod · 0.65

Tested by

no test coverage detected