{"record":{"id":"6cb5f62dba080468","repo":"grafana/k6","slug":"parsing-inner-html-options-w","errorCode":null,"errorMessage":"parsing inner HTML options: %w","messagePattern":"parsing inner HTML options: %w","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"info","filePath":"internal/js/modules/k6/browser/browser/frame_mapping.go","lineNumber":230,"sourceCode":"\t\t\t\t\treturn nil, err //nolint:wrapcheck\n\t\t\t\t}\n\n\t\t\t\treturn mapResponse(vu, resp), nil\n\t\t\t}), nil\n\t\t},\n\t\t\"hover\": func(selector string, opts sobek.Value) (*sobek.Promise, error) {\n\t\t\tpopts := common.NewFrameHoverOptions(f.Timeout())\n\t\t\tif err := popts.Parse(vu.Context(), opts); err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"parsing hover options: %w\", err)\n\t\t\t}\n\t\t\treturn promise(vu, func() (any, error) {\n\t\t\t\treturn nil, f.Hover(selector, popts) //nolint:wrapcheck\n\t\t\t}), nil\n\t\t},\n\t\t\"innerHTML\": func(selector string, opts sobek.Value) (*sobek.Promise, error) {\n\t\t\tpopts := common.NewFrameInnerHTMLOptions(f.Timeout())\n\t\t\tif err := popts.Parse(vu.Context(), opts); err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"parsing inner HTML options: %w\", err)\n\t\t\t}\n\t\t\treturn promise(vu, func() (any, error) {\n\t\t\t\treturn f.InnerHTML(selector, popts) //nolint:wrapcheck\n\t\t\t}), nil\n\t\t},\n\t\t\"innerText\": func(selector string, opts sobek.Value) (*sobek.Promise, error) {\n\t\t\tpopts := common.NewFrameInnerTextOptions(f.Timeout())\n\t\t\tif err := popts.Parse(vu.Context(), opts); err != nil {\n\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 := common.NewFrameInputValueOptions(f.Timeout())\n\t\t\tif err := popts.Parse(vu.Context(), opts); err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"parsing input value options: %w\", err)","sourceCodeStart":212,"sourceCodeEnd":248,"githubUrl":"https://github.com/grafana/k6/blob/93accf6570dcd306ca5e99cc44c393ee3797761b/internal/js/modules/k6/browser/browser/frame_mapping.go#L212-L248","documentation":"Options passed to frame.innerHTML(selector, opts) failed to parse (frame_mapping.go:230). FrameInnerHTMLOptions uses FrameBaseOptions whose Parse reads only 'strict' and 'timeout' and always returns nil - a defensive, effectively unreachable branch in this version.","triggerScenarios":"No innerHTML option value can trigger it today; 'strict' and 'timeout' are coerced without erroring.","commonSituations":"Not observed on stock k6; relevant only to forks or upgraded parsers.","solutions":["Pass only { timeout, strict }","Report to k6 with a reproducer if it fires on a stock build"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"const safeOpts = { timeout: Number(opts?.timeout) || undefined, strict: !!opts?.strict };","typeGuard":null,"tryCatchPattern":"try {\n  const html = await frame.innerHTML(sel, safeOpts);\n} catch (e) {\n  console.error(`innerHTML(${sel}) failed: ${e.message}`);\n}","preventionTips":["Use only timeout/strict","Treat this message on stock k6 as an upstream defect to report"],"tags":["k6","browser","frame","options-parsing","innerhtml"],"backgroundTag":null,"analyzedSha":"93accf6570dcd306ca5e99cc44c393ee3797761b","analyzedAt":"2026-08-15T21:23:27.118Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}