{"record":{"id":"0422a1f876a58d69","repo":"grafana/k6","slug":"another-element-is-intercepting-with-pointer-actio","errorCode":null,"errorMessage":"another element is intercepting with pointer action","messagePattern":"another element is intercepting with pointer action","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/js/modules/k6/browser/common/element_handle.go","lineNumber":1915,"sourceCode":"\t\t\"error:notelement\":             \"node is not an element\",\n\t\t\"error:nothtmlelement\":         \"not an HTMLElement\",\n\t\t\"error:notfillableelement\":     \"element is not an <input>, <textarea> or [contenteditable] element\",\n\t\t\"error:notfillableinputtype\":   \"input of this type cannot be filled\",\n\t\t\"error:notfillablenumberinput\": \"cannot type text into input[type=number]\",\n\t\t\"error:notvaliddate\":           \"malformed value\",\n\t\t\"error:notinput\":               \"node is not an HTMLInputElement\",\n\t\t\"error:notfile\":                \"node is not an input[type=file] element\",\n\t\t\"error:hasnovalue\":             \"node is not an HTMLInputElement or HTMLTextAreaElement or HTMLSelectElement\",\n\t\t\"error:notselect\":              \"element is not a <select> element\",\n\t\t\"error:notcheckbox\":            \"not a checkbox or radio button\",\n\t\t\"error:notmultiplefileinput\":   \"non-multiple file input can only accept single file\",\n\t\t\"error:strictmodeviolation\":    \"strict mode violation, multiple elements returned for selector query\",\n\t\t\"error:notqueryablenode\":       \"node is not queryable\",\n\t\t\"error:nthnocapture\":           \"can't query n-th element in a chained selector with capture\",\n\t\t\"error:intercept\":              \"another element is intercepting with pointer action\",\n\t}\n\tif err, ok := errs[serr]; ok {\n\t\treturn errors.New(err)\n\t}\n\n\treturn errors.New(serr)\n}\n","sourceCodeStart":1897,"sourceCodeEnd":1920,"githubUrl":"https://github.com/grafana/k6/blob/01ffac6f245854c1b8adc6a69857c76a15f90022/internal/js/modules/k6/browser/common/element_handle.go#L1897-L1920","documentation":"Mapped from 'error:intercept' by errorFromDOMError (element_handle.go:1896-1916). Before pointer actions (click, tap, hover-type interactions) k6 performs actionability checks: it verifies the target element would be the hit target at the click point. When a different element (overlay, sticky header, modal backdrop) would receive the pointer event instead, the action is aborted with this error.","triggerScenarios":"page.click('#submit') while a loading overlay, cookie banner, or modal backdrop covers the element; a fixed/sticky header overlapping the target after scrolling; the element animating or moving so the click point lands on a neighbor.","commonSituations":"SPAs with global spinners that fade slowly; anti-bot or consent overlays; clicking immediately after goto before the layout settles; elements in sticky containers on small viewports.","solutions":["Wait for the intercepting overlay to disappear: page.waitForSelector('.overlay', {state:'hidden'}) or waitForLoadState before retrying the click","Dismiss the interceptor first (click the banner close button, accept cookies)","Pass {force: true} in the action options to skip actionability checks when the interception is benign","Increase the action timeout so built-in retries can outlast a transient overlay","Scroll the element fully into view or pick a click position away from the overlap"],"exampleFix":"// before\nawait page.click('#submit');\n\n// after\nawait page.waitForSelector('.loading-overlay', { state: 'hidden' });\nawait page.click('#submit');","handlingStrategy":"retry","validationCode":"// Ensure the click target is the topmost element first\nawait page.waitForSelector('.overlay', { state: 'hidden' });\nawait page.click('#submit');","typeGuard":null,"tryCatchPattern":"async function safeClick(page, sel) {\n  for (let i = 0; i < 3; i++) {\n    try { return await page.click(sel); }\n    catch (e) {\n      if (!/intercepting/.test(e.message)) throw e;\n      await page.waitForTimeout(500);\n    }\n  }\n  return page.click(sel, { force: true }); // last resort\n}","preventionTips":["Wait for spinners/banners to hide before primary CTAs","Accept or dismiss known overlays (cookies, consent) right after goto","Use force:true knowingly, not as a blanket setting","Give actions a generous timeout so built-in retries can work"],"tags":["browser","click","actionability","overlay"],"backgroundTag":"click-intercepted","analyzedSha":"01ffac6f245854c1b8adc6a69857c76a15f90022","analyzedAt":"2026-08-18T03:05:52.393Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}