{"record":{"id":"65a7411d6bcf4af6","repo":"grafana/k6","slug":"parsing-press-options-of-selector-q-w","errorCode":null,"errorMessage":"parsing press options of selector %q: %w","messagePattern":"parsing press options of selector %q: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/js/modules/k6/browser/browser/page_mapping.go","lineNumber":366,"sourceCode":"\t\t\"frameLocator\": func(selector string) *sobek.Object {\n\t\t\tmfl := mapFrameLocator(vu, p.FrameLocator(selector))\n\t\t\treturn rt.ToValue(mfl).ToObject(rt)\n\t\t},\n\t\t\"mainFrame\": func() *sobek.Object {\n\t\t\tmf := mapFrame(vu, p.MainFrame())\n\t\t\treturn rt.ToValue(mf).ToObject(rt)\n\t\t},\n\t\t\"mouse\": mapMouse(vu, p.GetMouse()),\n\t\t\"on\":    mapPageOn(vu, p),\n\t\t\"opener\": func() *sobek.Promise {\n\t\t\treturn promise(vu, func() (any, error) {\n\t\t\t\treturn p.Opener(), nil\n\t\t\t})\n\t\t},\n\t\t\"press\": func(selector string, key string, opts sobek.Value) (*sobek.Promise, error) {\n\t\t\tpopts, err := parseFramePressOptions(rt, opts, p.Timeout())\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"parsing press 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 nil, p.Press(selector, key, popts) //nolint:wrapcheck\n\t\t\t}), nil\n\t\t},\n\t\t\"reload\": func(opts sobek.Value) (*sobek.Promise, error) {\n\t\t\tpopts := common.NewPageReloadOptions(common.LifecycleEventLoad, p.NavigationTimeout())\n\t\t\tif err := popts.Parse(vu.Context(), opts); err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"parsing reload options: %w\", err)\n\t\t\t}\n\t\t\treturn promise(vu, func() (any, error) {\n\t\t\t\tresp, err := p.Reload(popts)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err //nolint:wrapcheck\n\t\t\t\t}\n\t\t\t\tif resp == nil {\n\t\t\t\t\treturn nil, nil //nolint:nilnil\n\t\t\t\t}","sourceCodeStart":348,"sourceCodeEnd":384,"githubUrl":"https://github.com/grafana/k6/blob/8d06114777191d21ef885d05c5f8aa9e1ed838ae/internal/js/modules/k6/browser/browser/page_mapping.go#L348-L384","documentation":"Generic parse wrapper for page.press: the options argument failed to decode into common.FramePressOptions; %q is the selector. The wrapped error names the offending option — typically delay/timeout/noWaitAfter with wrong types.","triggerScenarios":"Thrown at internal/js/modules/k6/browser/browser/page_mapping.go:365 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure the key is a valid key name (e.g. 'Enter') and options only contain delay, timeout, noWaitAfter with correct types","Check the wrapped error for the failing field","Omit options to use defaults"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}