Still getting error: 'unable to click on object xxx' even though I used 'waitForElementClickable'


Step 4 is to click a button A and redirect to another page, then I wait for the button B to be clickable, but after clicking on button B, I got this error. But if I delay for a small amount of time, it works fine. But It seems not to make any sense that an element is unable to be clicked on even if waitforelementclickable is passed.

Could you change the “wait for element clickable” to a “wait for element visible” with a 10 second timeout period and see how that works.

Also is your project setting set to wait for page to be loaded or wait for x seconds?

Hi, hpulsford

Just tried wait for element visible, but with same error result.

checked that I already set wait for page to be load…

But anyway, after redirecting, delaying a short time solves this issue…

Ok thats great - what i will say is ideally you want to find a solution that doesnt need that delay. Just out of interest how long does the waitForElement step run for? Also when you watch the test run, does the element your trying to click look visually immediately ready for a click or does it load.

waitForElement Elapsed time: 1.066s

Yes, the element look visually immediately, but there seems to be a quick load since I can see a loading icon in the middle of the page. Maybe that prevents the click event.

hmm yea possibly - if you find a solution let us know :slight_smile:

I’ve had this happen to me before where there is a loading overlay that covers the elements until its done loading. Manually I wouldn’t even see the overlay or it would be a quick flash but the katalon scripts would break every time.

Check the details of your console log. It says unable to click on object in your screenshot but it doesn’t say why. It will tell you if there is an element in the way or if something else is going on.