[Trouble Shooting 101] Element click intercepted exception

Troubleshooting time!

Hey folks,

If your test suddenly throws an ElementClickInterceptedException, don’t worry, your script isn’t broken. It just clicked a little too fast before the UI was ready. In this topic, we’ll explain why this happens and show you a simple, reliable way to fix it so your tests can click with confidence again.

:white_check_mark: Summary

An ElementClickInterceptedException means something (a pop‑up, modal or overlay) is blocking your target element. Close or dismiss the blocking element, then call WebUI.waitForElementClickable(testObject, timeout) to wait until the element is clickable. This keyword returns true when the element becomes clickable and false otherwise.

:puzzle_piece: Problem description

When clicking a button or link in a WebUI test, you receive an exception:

org.openqa.selenium.ElementClickInterceptedException: element click intercepted

→ The element is not clickable because another object sits on top of it (e.g., cookie banner or loading overlay).

Solution

  1. Remove the overlay or pop‑up - Close any blocking dialogs before performing the click.

  2. Wait for the element to be clickable - Use the built‑in waitForElementClickable keyword:

// Wait up to 20 seconds for the element to become clickable

WebUI.waitForElementClickable(findTestObject(‘Page_CuraHomepage/btn_MakeAppointment’), 20)

WebUI.click(findTestObject(‘Page_CuraHomepage/btn_MakeAppointment’))

This waits until the element is both present and clickable (returns true), preventing premature clicks. If the wait times out (returns false), the element is still not ready.

For more details and parameter descriptions, see the official Katalon documentation: [WebUI] Wait For Element Clickable.

Hope you find the topic useful :grinning_face:

-The Katalon Community Team

3 Likes