Dusk error (element is not clickable at point (x, y). Other Element would receive the click. [FIX]

Viewed 308

A fix I found for the "element is not clickable at point (x, y) Other element would receive the click." within Dusk Browser Testing.

The issue occured often on Travis CI, but not easily reproduced locally.

This is often caused by checkbox labels or by the element being off the page (and needed to be scrolled to). This fix is not for those issues.

In my case, I had a custom dropdown made of divs, I would try and click .dropdown__item, that was wrapped in a div: .dropdown. The click would try to target the dropdown__item but .dropdown would receive the click. The simple fix is simply stopping propagation on the dropdown__item. Using Vue2 that is simply @click.stop="methodName".

For vanilla JS it would be event.stopPropagation()

Hope this helps somebody down the line.

0 Answers
Related