{"record":{"id":"84d853a7357e76a1","repo":"grafana/k6","slug":"parsing-ischecked-options-of-selector-q-w","errorCode":null,"errorMessage":"parsing isChecked options of selector %q: %w","messagePattern":"parsing isChecked options of selector %q: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/js/modules/k6/browser/browser/frame_mapping.go","lineNumber":255,"sourceCode":"\t\t\t\treturn nil, fmt.Errorf(\"parsing inner text options: %w\", err)\n\t\t\t}\n\t\t\treturn promise(vu, func() (any, error) {\n\t\t\t\treturn f.InnerText(selector, popts) //nolint:wrapcheck\n\t\t\t}), nil\n\t\t},\n\t\t\"inputValue\": func(selector string, opts sobek.Value) (*sobek.Promise, error) {\n\t\t\tpopts, err := parseFrameInputValueOptions(rt, opts, f.Timeout())\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"parsing input value options: %w\", err)\n\t\t\t}\n\t\t\treturn promise(vu, func() (any, error) {\n\t\t\t\treturn f.InputValue(selector, popts) //nolint:wrapcheck\n\t\t\t}), nil\n\t\t},\n\t\t\"isChecked\": func(selector string, opts sobek.Value) (*sobek.Promise, error) {\n\t\t\tpopts, err := parseFrameIsCheckedOptions(rt, opts, f.Timeout())\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"parsing isChecked options of selector %q: %w\", selector, err)\n\t\t\t}\n\t\t\treturn promise(vu, func() (any, error) {\n\t\t\t\treturn f.IsChecked(selector, popts) //nolint:wrapcheck\n\t\t\t}), nil\n\t\t},\n\t\t\"isDetached\": f.IsDetached,\n\t\t\"isDisabled\": func(selector string, opts sobek.Value) (*sobek.Promise, error) {\n\t\t\tpopts, err := parseFrameIsDisabledOptions(rt, opts, f.Timeout())\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"parsing isDisabled options of selector %q: %w\", selector, err)\n\t\t\t}\n\t\t\treturn promise(vu, func() (any, error) {\n\t\t\t\treturn f.IsDisabled(selector, popts) //nolint:wrapcheck\n\t\t\t}), nil\n\t\t},\n\t\t\"isEditable\": func(selector string, opts sobek.Value) (*sobek.Promise, error) {\n\t\t\tpopts, err := parseFrameIsEditableOptions(rt, opts, f.Timeout())\n\t\t\tif err != nil {","sourceCodeStart":237,"sourceCodeEnd":273,"githubUrl":"https://github.com/grafana/k6/blob/8d06114777191d21ef885d05c5f8aa9e1ed838ae/internal/js/modules/k6/browser/browser/frame_mapping.go#L237-L273","documentation":"Thrown when `frame.isChecked(selector, opts)` receives options that fail to parse into FrameIsCheckedOptions (FrameBaseOptions: `strict`, `timeout` ms). The selector is included in the message (%q) to identify the failing call. Parse is currently coercive, so this branch is defensive.","triggerScenarios":"Would only fire with a strict Parse; today `strict` and `timeout` are coerced and all other keys ignored, so no input produces this error.","commonSituations":"Passing Playwright-only option keys; typo'd keys (e.g. `timout`) being silently ignored, causing the default timeout to apply unexpectedly.","solutions":["Use exactly { strict: boolean, timeout: number_ms }","Check for typos in option keys — they are silently ignored rather than erroring","Note the selector appears in the message, so the failing call is easy to locate in logs"],"exampleFix":"// before\nawait frame.isChecked('#cb', { timout: 3000 });\n\n// after\nawait frame.isChecked('#cb', { timeout: 3000 });","handlingStrategy":"try-catch","validationCode":"const opts = { timeout: 3000, strict: true };\nif (typeof opts.strict !== 'boolean') throw new Error('strict must be a boolean');\nif (opts.timeout != null && typeof opts.timeout !== 'number') throw new Error('timeout must be a number (ms)');","typeGuard":"function isFrameBaseOptions(o) {\n  return o == null || (typeof o === 'object' &&\n    (o.strict === undefined || typeof o.strict === 'boolean') &&\n    (o.timeout === undefined || typeof o.timeout === 'number'));\n}","tryCatchPattern":"try {\n  await frame.isChecked(sel, opts);\n} catch (e) {\n  if (String(e).includes('parsing isChecked options')) { console.error(`bad opts for selector ${sel}`); } else { throw e; }\n}","preventionTips":["The selector is quoted in the error — use it to locate the call","strict: true makes the method throw when the selector resolves to multiple elements","Never pass strings for strict ('false' coerces to true)"],"tags":["k6","browser","frame","is-checked","selector","options"],"backgroundTag":"invalid-options-argument","analyzedSha":"8d06114777191d21ef885d05c5f8aa9e1ed838ae","analyzedAt":"2026-09-14T20:10:14.619Z","contentChangedAt":"2026-09-14T20:10:14.619Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}