# Solution for the error "Unable to click on object"

**URL:** <https://forum.katalon.com/t/solution-for-the-error-unable-to-click-on-object/44643>\
**Category:** Web Testing\
**Tags:** katalon-studio\
**Created:** [June 17, 2020, 9:09am UTC](https://forum.katalon.com/t/solution-for-the-error-unable-to-click-on-object/44643 "2020-06-17T09:09:52Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![rafiq](https://avatars.discourse-cdn.com/v4/letter/r/53a042/32.png) [@rafiq](https://forum.katalon.com/u/rafiq)\
**Post date:** [June 17, 2020, 9:09am UTC](https://forum.katalon.com/t/solution-for-the-error-unable-to-click-on-object/44643/1 "2020-06-17T09:09:53Z")

</div>

I am using Katalon Studio Record and play to record the test cases but due to some issue when i am trying to play it, it gives me error  
com.kms.katalon.core.exception.StepFailedException: Unable to click on object ‘Object Repository/Page\_es Grade section codes/button\_Close’ (Root cause: com.kms.katalon.core.exception.StepFailedException: Unable to click on object ‘Object Repository/Page\_es Grade section codes/button\_Close’  
Need a fix  
I have already tried solutions like waitForElement and delay techniques, as i am new to the automation testing.

---

<div class="post-metadata">

**Author:** ![Russ\_Thomas](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/russ_thomas/32/11884_2.png) [@Russ\_Thomas](https://forum.katalon.com/u/Russ_Thomas)\
**Post date:** [June 17, 2020, 3:58pm UTC](https://forum.katalon.com/t/solution-for-the-error-unable-to-click-on-object/44643/2 "2020-06-17T15:58:56Z")

</div>

We need to see the error log where it says “Caused by”.

Read this post - there is a lot of useful information to help you post better reports/questions:

> [@\[TIP\] How To Help Us Help You!](http://forum.katalon.com/t/tip-how-to-help-us-help-you-my-test-is-broken-nothing-works-updated-nov-2019/12919):
>
> My test is BROKEN! NOTHING WORKS! HELP ME! Relax. We get it. We really do. There are some pretty smart and clever people on this forum, but you must realize, they are not magicians or wizards or gods. They cannot see your code, they can’t see your errors and they don’t even know what your AUT is meant to do even though it might seem perfectly obvious to you. So please relax and follow the advice below, before you start writing your post. The advice below will tell you the exact information …

---

<div class="post-metadata">

**Author:** ![rafiq](https://avatars.discourse-cdn.com/v4/letter/r/53a042/32.png) [@rafiq](https://forum.katalon.com/u/rafiq)\
**Post date:** [June 18, 2020, 11:26am UTC](https://forum.katalon.com/t/solution-for-the-error-unable-to-click-on-object/44643/3 "2020-06-18T11:26:14Z")

</div>

Thanks for you response  
The post was also helpful  
Here are screen shots of the error.

 ![Screenshot (28)](https://europe1.discourse-cdn.com/katalon/original/2X/e/e2ef5396a86428cc09c4dc6884e8f40f1d3e69eb.png)  
 ![Screenshot (29)](https://europe1.discourse-cdn.com/katalon/original/2X/f/f176b4d8d4b3ae62133bdc49af51f9a16972f23a.png)  
 ![Screenshot (30)](https://europe1.discourse-cdn.com/katalon/original/2X/5/56ac06394652b6822f46c3038dd053ba16a34c3a.png)

---

<div class="post-metadata">

**Author:** ![Russ\_Thomas](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/russ_thomas/32/11884_2.png) [@Russ\_Thomas](https://forum.katalon.com/u/Russ_Thomas)\
**Post date:** [June 18, 2020, 12:04pm UTC](https://forum.katalon.com/t/solution-for-the-error-unable-to-click-on-object/44643/4 "2020-06-18T12:04:20Z")

</div>

I think you missed this…

> [@Russ\_Thomas](#):
>
> We need to see the error log where it says “Caused by”.

I’m away for most of today - maybe these guys can step in: @Brandon_Hein @kazurayam

---

<div class="post-metadata">

**Author:** ![rafiq](https://avatars.discourse-cdn.com/v4/letter/r/53a042/32.png) [@rafiq](https://forum.katalon.com/u/rafiq)\
**Post date:** [June 18, 2020, 12:15pm UTC](https://forum.katalon.com/t/solution-for-the-error-unable-to-click-on-object/44643/5 "2020-06-18T12:15:32Z")

</div>

Alright. Here it is.  
Caused by: org.openqa.selenium.ElementNotInteractableException: element not interactable  
(Session info: chrome=83.0.4103.97)  
Build info: version: ‘3.141.59’, revision: ‘e82be7d358’, time: ‘2018-11-14T08:25:53’  
System info: host: ‘S\*\*\*\*\*\*\*\_S\*\*\ ***0’, ip: '192.168.**.\*’, os.name: ‘Windows 10’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘1.8.0\_181’  
Driver info: com.kms.katalon.selenium.driver.CChromeDriver  
Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 83.0.4103.97, chrome: {chromedriverVersion: 83.0.4103.39 (ccbf011cb2d2b…, userDataDir: C:\Users\EDUBLO~1\AppData\L…}, goog:chromeOptions: {debuggerAddress: localhost:49854}, javascriptEnabled: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: WINDOWS, platformName: WINDOWS, proxy: Proxy(), setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify, webauthn:virtualAuthenticators: true}  
Session ID: 3479c26005a76419dea3c41486d7630e

---

<div class="post-metadata">

**Author:** ![ThanhTo](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/thanhto/32/697_2.png) [@ThanhTo](https://forum.katalon.com/u/ThanhTo)\
**Post date:** [June 18, 2020, 2:00pm UTC](https://forum.katalon.com/t/solution-for-the-error-unable-to-click-on-object/44643/6 "2020-06-18T14:00:02Z")

</div>

> [@rafiq](#):
>
> : org.openqa.selenium.ElementNotInteractableException: element not interactable

This suggests the element is not interactable, try to add WaitForElementClickable before clicking the element to see if it helps.

---

<div class="post-metadata">

**Author:** ![rafiq](https://avatars.discourse-cdn.com/v4/letter/r/53a042/32.png) [@rafiq](https://forum.katalon.com/u/rafiq)\
**Post date:** [June 19, 2020, 7:14am UTC](https://forum.katalon.com/t/solution-for-the-error-unable-to-click-on-object/44643/7 "2020-06-19T07:14:55Z")

</div>

Thanks Thanh To for the response.  
I tried the method waitForElementClickable in the script as  
WebUI.waitForElementClickable(‘Object Repository/Page\_edublooms Home/button\_Close’, 3)  
but the result is same.  
Caused by: org.openqa.selenium.ElementNotInteractableException: element not interactable  
(Session info: chrome=83.0.4103.106)

---

<div class="post-metadata">

**Author:** ![Brandon\_Hein](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/brandon_hein/32/1092_2.png) [@Brandon\_Hein](https://forum.katalon.com/u/Brandon_Hein)\
**Post date:** [June 19, 2020, 7:30am UTC](https://forum.katalon.com/t/solution-for-the-error-unable-to-click-on-object/44643/8 "2020-06-19T07:30:12Z")

</div>

Can you share the locator you are using in test object ‘Page\_edublooms Home/button\_Close’?

Another possibility is that you may be targeting a different element than the one you were expecting, and that element truly is not interactable.

---

<div class="post-metadata">

**Author:** ![rafiq](https://avatars.discourse-cdn.com/v4/letter/r/53a042/32.png) [@rafiq](https://forum.katalon.com/u/rafiq)\
**Post date:** [June 19, 2020, 8:49am UTC](https://forum.katalon.com/t/solution-for-the-error-unable-to-click-on-object/44643/9 "2020-06-19T08:49:24Z")

</div>

The locator i’m using to test is in screen shot.

 ![Screenshot (28)](https://europe1.discourse-cdn.com/katalon/original/2X/e/e2ef5396a86428cc09c4dc6884e8f40f1d3e69eb.png)  
 ![Screenshot (29)](https://europe1.discourse-cdn.com/katalon/original/2X/f/f176b4d8d4b3ae62133bdc49af51f9a16972f23a.png)  
 ![Screenshot (30)](https://europe1.discourse-cdn.com/katalon/original/2X/5/56ac06394652b6822f46c3038dd053ba16a34c3a.png)

---

<div class="post-metadata">

**Author:** ![Russ\_Thomas](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/russ_thomas/32/11884_2.png) [@Russ\_Thomas](https://forum.katalon.com/u/Russ_Thomas)\
**Post date:** [June 19, 2020, 12:18pm UTC](https://forum.katalon.com/t/solution-for-the-error-unable-to-click-on-object/44643/10 "2020-06-19T12:18:07Z")

</div>

> [@rafiq](#):
>
> The locator i’m using to test is in screen shot

What Brandon is asking for, is _the definition_ of the test object from Katalon’s Object Repository. Usually XPath, or CSS.

---

<div class="post-metadata">

**Author:** ![rafiq](https://avatars.discourse-cdn.com/v4/letter/r/53a042/32.png) [@rafiq](https://forum.katalon.com/u/rafiq)\
**Post date:** [June 20, 2020, 5:19am UTC](https://forum.katalon.com/t/solution-for-the-error-unable-to-click-on-object/44643/11 "2020-06-20T05:19:49Z")

</div>

Oh I see  
I think this attachment will do.

 ![Screenshot (32)](https://europe1.discourse-cdn.com/katalon/original/2X/1/12782425716843bc7d7c4f5795cd57952fcba246.png)

---

<div class="post-metadata">

**Author:** ![Russ\_Thomas](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/russ_thomas/32/11884_2.png) [@Russ\_Thomas](https://forum.katalon.com/u/Russ_Thomas)\
**Post date:** [June 20, 2020, 2:51pm UTC](https://forum.katalon.com/t/solution-for-the-error-unable-to-click-on-object/44643/12 "2020-06-20T14:51:04Z")

</div>

I don’t use XPath.

If you change the definition to use CSS, this will work:

```auto
#UpdateGradeSectionCodes1 .modal-footer button[type=button]

```

Be sure to WAIT until the button is ready.

---

<div class="post-metadata">

**Author:** ![Brandon\_Hein](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/brandon_hein/32/1092_2.png) [@Brandon\_Hein](https://forum.katalon.com/u/Brandon_Hein)\
**Post date:** [June 20, 2020, 10:50pm UTC](https://forum.katalon.com/t/solution-for-the-error-unable-to-click-on-object/44643/13 "2020-06-20T22:50:02Z")

</div>

`(//button[@type='button'])[178]`

This is a really really bad xpath (I’m assuming it’s from the recorder/object spy).

Try this one instead:

`//form[@id='UpdateGradeSectionCodes1']//button[text()='Close']`

---

<div class="post-metadata">

**Author:** ![helpdesk](https://avatars.discourse-cdn.com/v4/letter/h/7c8e57/32.png) [@helpdesk](https://forum.katalon.com/u/helpdesk)\
**Post date:** [June 21, 2020, 8:48pm UTC](https://forum.katalon.com/t/solution-for-the-error-unable-to-click-on-object/44643/14 "2020-06-21T20:48:06Z")

</div>

Just a note, that an XPath that should work would be:

id(“UpdateGradeSectionCodes1”)/div[@class=“modal-footer”]/button[@class=“btn btn-secondary”]

Also, if you try to copy and paste the above, you will have to fix “smart” quotes (quotes that have a curl or curve to them) that this forum supports but that KS does not.

---

<div class="post-metadata">

**Author:** ![rafiq](https://avatars.discourse-cdn.com/v4/letter/r/53a042/32.png) [@rafiq](https://forum.katalon.com/u/rafiq)\
**Post date:** [June 23, 2020, 10:56am UTC](https://forum.katalon.com/t/solution-for-the-error-unable-to-click-on-object/44643/15 "2020-06-23T10:56:43Z")

</div>

Thanks for taking time to look into my problem, worth appreciation.  
I tried all the above solutions you provided but some how I am still facing the same issue. I did some experiment with the xpath as well. But with no luck.  
I’m wondering if someone can spear some time so we can fix this problem.  
Thanks.

---

<div class="post-metadata">

**Author:** ![ThanhTo](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/thanhto/32/697_2.png) [@ThanhTo](https://forum.katalon.com/u/ThanhTo)\
**Post date:** [June 23, 2020, 11:11am UTC](https://forum.katalon.com/t/solution-for-the-error-unable-to-click-on-object/44643/17 "2020-06-23T11:11:01Z")

</div>

There’s an answer on StackOverflow suggesting it the modal is in another window. It’s not an accepted solution so I am not sure, however it’s worth trying:

> <https://stackoverflow.com/questions/39468237/unable-to-click-on-a-popup-button-in-selenium-webdriver-with-java>

You just need to substitute `config.driver` with `DriverFactory.getWebDriver()`, the logic should be the same.

---

<div class="post-metadata">

**Author:** ![rafiq](https://avatars.discourse-cdn.com/v4/letter/r/53a042/32.png) [@rafiq](https://forum.katalon.com/u/rafiq)\
**Post date:** [June 23, 2020, 12:13pm UTC](https://forum.katalon.com/t/solution-for-the-error-unable-to-click-on-object/44643/18 "2020-06-23T12:13:47Z")

</div>

Thanks Thanh To  
The post on Stack Overflow suggests to switch to the modal window on which the error appears and also it says to apply wait for element method. I have already used these method  
I am stuck here for days now. Better will be to escalate the problem to upper level so that I can set a zoom meeting with them.  
Thanks

---

<div class="post-metadata">

**Author:** ![pereira.rfc](https://avatars.discourse-cdn.com/v4/letter/p/a9adbd/32.png) [@pereira.rfc](https://forum.katalon.com/u/pereira.rfc)\
**Post date:** [January 17, 2025, 4:05am UTC](https://forum.katalon.com/t/solution-for-the-error-unable-to-click-on-object/44643/19 "2025-01-17T04:05:43Z")

</div>

> [@ThanhTo](#):
>
> Unable to click on a popup button in selenium webdriver with java

Hey mate, i’m probably coming late to help, but i had the same problem and i solved it using the function WebUI. **enhancedClick** (findTestObject(‘Object’)).

Hope it helps someone else in case it won’t help you.

---

<div class="post-metadata">

**Author:** ![chaninat](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/chaninat/32/16103_2.png) [@chaninat](https://forum.katalon.com/u/chaninat)\
**Post date:** [March 16, 2025, 9:35am UTC](https://forum.katalon.com/t/solution-for-the-error-unable-to-click-on-object/44643/20 "2025-03-16T09:35:18Z")

</div>

Is work, Thank alot.
