{"record":{"id":"22ee99b1ce637705","repo":"grafana/k6","slug":"parse-iseditable-options-of-selector-q-w","errorCode":null,"errorMessage":"parse isEditable options of selector %q: %w","messagePattern":"parse isEditable options of selector %q: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/js/modules/k6/browser/browser/frame_mapping.go","lineNumber":274,"sourceCode":"\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 {\n\t\t\t\treturn nil, fmt.Errorf(\"parse isEditable 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.IsEditable(selector, popts) //nolint:wrapcheck\n\t\t\t}), nil\n\t\t},\n\t\t\"isEnabled\": func(selector string, opts sobek.Value) (*sobek.Promise, error) {\n\t\t\tpopts, err := parseFrameIsEnabledOptions(rt, opts, f.Timeout())\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"parse isEnabled 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.IsEnabled(selector, popts) //nolint:wrapcheck\n\t\t\t}), nil\n\t\t},\n\t\t\"isHidden\": func(selector string, opts sobek.Value) (*sobek.Promise, error) {\n\t\t\tpopts, err := parseFrameIsHiddenOptions(rt, opts)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"parse isHidden options of selector %q: %w\", selector, err)","sourceCodeStart":256,"sourceCodeEnd":292,"githubUrl":"https://github.com/grafana/k6/blob/8d06114777191d21ef885d05c5f8aa9e1ed838ae/internal/js/modules/k6/browser/browser/frame_mapping.go#L256-L292","documentation":"Thrown when `frame.isEditable(selector, opts)` options fail to parse into FrameIsEditableOptions (FrameBaseOptions: `strict`, `timeout` ms). Message includes the selector and uses the wording \"parse isEditable options\" (most siblings say \"parsing\"). Parse is coercive today, so the branch is defensive.","triggerScenarios":"Not reachable with the current coercive Parse; would require strict validation of `strict`/`timeout` types.","commonSituations":"Ported Playwright scripts with unsupported keys; env-driven config injecting strings into the options object.","solutions":["Pass { strict: bool, timeout: number_ms }","Sanitize config-sourced options (JSON/env) before passing them to browser APIs","Grep logs for the exact 'parse isEditable options' wording — it is unique to this call"],"exampleFix":"// before\nawait frame.isEditable('#tb', { timeout: Number('abc') }); // NaN -> 0\n\n// after\nawait frame.isEditable('#tb', { timeout: 3000 });","handlingStrategy":"try-catch","validationCode":"const opts = { timeout: 3000 };\nif (opts.timeout != null && !Number.isInteger(opts.timeout)) console.warn('non-integer timeout may coerce unexpectedly');","typeGuard":"function isFrameBaseOptions(o) {\n  return o == null || (typeof o === 'object' && (o.timeout === undefined || Number.isFinite(o.timeout)));\n}","tryCatchPattern":"try {\n  await frame.isEditable(sel, opts);\n} catch (e) {\n  if (String(e).includes('parse isEditable options')) { /* note: this message says parse, not parsing */ } else { throw e; }\n}","preventionTips":["This message uniquely begins with 'parse isEditable' — useful for grep","Sanitize env/JSON-sourced option values before passing them in","Keep strict/timeout as proper primitives"],"tags":["k6","browser","frame","is-editable","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"}