{"record":{"id":"f43ce1652e12c283","repo":"grafana/k6","slug":"double-clicking-on-q-w","errorCode":null,"errorMessage":"double clicking on %q: %w","messagePattern":"double clicking on %q: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/js/modules/k6/browser/common/frame.go","lineNumber":797,"sourceCode":"\n\tv, err := f.Evaluate(js)\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"getting frame content: %w\", err)\n\t}\n\ts, ok := v.(string)\n\tif !ok {\n\t\treturn \"\", fmt.Errorf(\"getting frame content: expected string, got %T\", v)\n\t}\n\n\treturn s, nil\n}\n\n// Dblclick double clicks an element matching provided selector.\nfunc (f *Frame) Dblclick(selector string, popts *FrameDblclickOptions) error {\n\tf.log.Debugf(\"Frame:DblClick\", \"fid:%s furl:%q sel:%q\", f.ID(), f.URL(), selector)\n\n\tif err := f.dblclick(selector, popts); err != nil {\n\t\treturn fmt.Errorf(\"double clicking on %q: %w\", selector, err)\n\t}\n\n\tapplySlowMo(f.ctx)\n\n\treturn nil\n}\n\n// dblclick is like Dblclick but takes parsed options and neither throws\n// an error, or applies slow motion.\nfunc (f *Frame) dblclick(selector string, opts *FrameDblclickOptions) error {\n\tdblclick := func(_ context.Context, eh *ElementHandle, p *Position) (any, error) {\n\t\treturn nil, eh.dblclick(p, opts.ToMouseClickOptions())\n\t}\n\tact := f.newPointerAction(\n\t\tselector, DOMElementStateAttached, opts.Strict, dblclick, &opts.ElementHandleBasePointerOptions,\n\t)\n\tif _, err := call(f.ctx, act, opts.Timeout); err != nil {\n\t\treturn errorFromDOMError(err)","sourceCodeStart":779,"sourceCodeEnd":815,"githubUrl":"https://github.com/grafana/k6/blob/93accf6570dcd306ca5e99cc44c393ee3797761b/internal/js/modules/k6/browser/common/frame.go#L779-L815","documentation":"Frame.Dblclick() runs a pointer action that waits for the element to be visible, stable and enabled, then dispatches a double click. This error wraps any failure of that pipeline: injected-script wait timeout ('timed out after Nms'), element covered/intercepted, strict-mode multiple matches, or non-actionable targets.","triggerScenarios":"Element not rendered/visible within opts.Timeout; an overlay intercepts pointer events; selector matches several nodes with strict:true; the target does not accept double clicks (some inputs).","commonSituations":"Testing grid rows that open on double click while a loading mask is up; slow hydration in SPAs; duplicated selectors in tables; CI with reduced timeouts.","solutions":["Wait for visible state and pass a larger timeout to dblclick.","Use a unique selector (data-testid) to satisfy strict mode.","Dismiss/await overlays (spinners, masks) before double clicking."],"exampleFix":"// before\nframe.dblclick('tr.row'); // many rows -> strict failure\n\n// after\nawait frame.waitForSelector('tr.row[data-id=\"42\"]', { state: 'visible' });\nframe.dblclick('tr.row[data-id=\"42\"]', { timeout: 30000 });","handlingStrategy":"validation","validationCode":"await frame.waitForSelector(sel, { state: 'visible', timeout: 30000 });","typeGuard":null,"tryCatchPattern":"try {\n  frame.dblclick(sel, { timeout: 30000 });\n} catch (e) {\n  if (/timed out/.test(e.message)) { /* element not actionable — investigate overlay/visibility */ }\n}","preventionTips":["Use unique selectors in repeated lists/tables.","Await loading masks/spinners before double clicking.","Pass explicit generous timeouts in CI."],"tags":["browser","dblclick","selector","timeout","actionability","strict-mode"],"backgroundTag":null,"analyzedSha":"93accf6570dcd306ca5e99cc44c393ee3797761b","analyzedAt":"2026-08-15T21:23:27.118Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}