{"record":{"id":"e65e1a8447f5ad2a","repo":"grafana/k6","slug":"tapping-on-q-w-e65e1a","errorCode":null,"errorMessage":"tapping on %q: %w","messagePattern":"tapping on %q: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/js/modules/k6/browser/common/locator.go","lineNumber":620,"sourceCode":"\topts.Strict = true\n\topts.retry = true\n\tif err := l.frame.hover(l.selector, opts); err != nil {\n\t\treturn fmt.Errorf(\"hovering on %q: %w\", l.selector, err)\n\t}\n\n\tapplySlowMo(l.ctx)\n\n\treturn nil\n}\n\n// Tap the element found that matches the locator's selector with strict mode on.\nfunc (l *Locator) Tap(opts *FrameTapOptions) error {\n\tl.log.Debugf(\"Locator:Tap\", \"fid:%s furl:%q sel:%q opts:%+v\", l.frame.ID(), l.frame.URL(), l.selector, opts)\n\n\topts.Strict = true\n\topts.retry = true\n\tif err := l.frame.tap(l.selector, opts); err != nil {\n\t\treturn fmt.Errorf(\"tapping on %q: %w\", l.selector, err)\n\t}\n\n\tapplySlowMo(l.ctx)\n\n\treturn nil\n}\n\n// DispatchEvent dispatches an event for the element matching the\n// locator's selector with strict mode on.\nfunc (l *Locator) DispatchEvent(typ string, eventInit any, opts *FrameDispatchEventOptions) error {\n\tl.log.Debugf(\n\t\t\"Locator:DispatchEvent\", \"fid:%s furl:%q sel:%q typ:%q eventInit:%+v opts:%+v\",\n\t\tl.frame.ID(), l.frame.URL(), l.selector, typ, eventInit, opts,\n\t)\n\n\topts.Strict = true\n\tif err := l.frame.dispatchEvent(l.selector, typ, eventInit, opts); err != nil {\n\t\treturn fmt.Errorf(\"dispatching locator event %q to %q: %w\", typ, l.selector, err)","sourceCodeStart":602,"sourceCodeEnd":638,"githubUrl":"https://github.com/grafana/k6/blob/01ffac6f245854c1b8adc6a69857c76a15f90022/internal/js/modules/k6/browser/common/locator.go#L602-L638","documentation":"Wrapped failure from Frame.tap (with retry enabled) while tapping the element matched by the locator's selector (strict mode forced). Fires on zero/multiple matches, when the element is not tappable (hidden, zero-size, or covered by another element), or when the CDP touch events fail after retries.","triggerScenarios":"Thrown at internal/js/modules/k6/browser/common/locator.go:620 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure the element is visible, has a stable bounding box, and is not covered","Ensure touch emulation is active for the browser context when tapping","Retry after waiting for overlays/spinners to disappear"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"01ffac6f245854c1b8adc6a69857c76a15f90022","analyzedAt":"2026-08-18T03:05:52.393Z","contentChangedAt":"2026-08-18T03:05:52.393Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}