# Unable to perform button click operation

**URL:** <https://forum.katalon.com/t/unable-to-perform-button-click-operation/6209>\
**Category:** Miscellaneous\
**Created:** [May 26, 2017, 8:19am UTC](https://forum.katalon.com/t/unable-to-perform-button-click-operation/6209 "2017-05-26T08:19:47Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Raj\_Kumar](https://avatars.discourse-cdn.com/v4/letter/r/f05b48/32.png) [@Raj\_Kumar](https://forum.katalon.com/u/Raj_Kumar)\
**Post date:** [May 26, 2017, 8:19am UTC](https://forum.katalon.com/t/unable-to-perform-button-click-operation/6209/1 "2017-05-26T08:19:47Z")

</div>

When i run the script recorded through record and play back method for my login page, the button click operation for login can’t be performed, it displays the error “Unable to click on object ‘Object Repository/temp1/Page\_FreightRover - Login/input\_btn btn-success btn-lg c’ (Root cause: com.kms.katalon.core.webui.exception.WebElementNotFoundException: Web element with id: ‘Object Repository/temp1/Page\_FreightRover - Login/input\_btn btn-success btn-lg c’ located by ‘By.xpath: //input[count(. | id(“isMember”)/div[@class=“form-item form-item-on-top form-horizontal”]/div[@class=“form-group”]/div[@class=“row”]/div[@class=“col-sm-6 col-xs-6”]/input[@class=“btn btn-success btn-lg col-xs-12 signin\_icon”]) = count(id(“isMember”)/div[@class=“form-item form-item-on-top form-horizontal”]/div[@class=“form-group”]/div[@class=“row”]/div[@class=“col-sm-6 col-xs-6”]/input[@class=“btn btn-success btn-lg col-xs-12 signin\_icon”])]’ not found)”. I also tried capturing that with object spy method also, but it displays the error “groovy.lang.MissingMethodException: No signature of method: static com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.setText() is applicable for argument types: (java.lang.String, java.lang.String, com.kms.katalon.core.model.FailureHandling) values:”

---

<div class="post-metadata">

**Author:** ![Phoebe](https://avatars.discourse-cdn.com/v4/letter/p/41988e/32.png) [@Phoebe](https://forum.katalon.com/u/Phoebe)\
**Post date:** [August 8, 2017, 7:39am UTC](https://forum.katalon.com/t/unable-to-perform-button-click-operation/6209/2 "2017-08-08T07:39:25Z")

</div>

Hey Raj,

Did you end up getting anywhere with this?

I am coming across the same issues with my tests.

Appreciate the help.

Thanks,

Phoebe

---

<div class="post-metadata">

**Author:** ![Suhas](https://avatars.discourse-cdn.com/v4/letter/s/4af34b/32.png) [@Suhas](https://forum.katalon.com/u/Suhas)\
**Post date:** [June 16, 2017, 7:40am UTC](https://forum.katalon.com/t/unable-to-perform-button-click-operation/6209/3 "2017-06-16T07:40:36Z")

</div>

Hi Raj,

Please go to developer tool in chrome and try to copy the xpath for the button which you want to click. update copied xpath for that button and then run the script.

---

<div class="post-metadata">

**Author:** ![Raj\_Kumar](https://avatars.discourse-cdn.com/v4/letter/r/f05b48/32.png) [@Raj\_Kumar](https://forum.katalon.com/u/Raj_Kumar)\
**Post date:** [May 30, 2017, 11:06am UTC](https://forum.katalon.com/t/unable-to-perform-button-click-operation/6209/4 "2017-05-30T11:06:08Z")

</div>

Hi duyluong,

Still it is failing on that same step… i don’t face any issue while entering the values in the text field. It becomes unresponsive on that button click step…

---

<div class="post-metadata">

**Author:** ![Raj\_Kumar](https://avatars.discourse-cdn.com/v4/letter/r/f05b48/32.png) [@Raj\_Kumar](https://forum.katalon.com/u/Raj_Kumar)\
**Post date:** [May 26, 2017, 11:18am UTC](https://forum.katalon.com/t/unable-to-perform-button-click-operation/6209/5 "2017-05-26T11:18:20Z")

</div>

This is the line of code where i am getting that error:

WebUI.click(findTestObject(‘ **my element id goes by here** ’),10)

I deselected the other locators and selected xpath alone, added the wait property and tried, still it shows the same error.

“groovy.lang.MissingMethodException: No signature of method: static com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.setText() is applicable for argument types: (java.lang.String, java.lang.String, com.kms.katalon.core.model.FailureHandling) values:”

---

<div class="post-metadata">

**Author:** ![Hari\_Charan](https://avatars.discourse-cdn.com/v4/letter/h/a88e57/32.png) [@Hari\_Charan](https://forum.katalon.com/u/Hari_Charan)\
**Post date:** [May 26, 2017, 9:30am UTC](https://forum.katalon.com/t/unable-to-perform-button-click-operation/6209/6 "2017-05-26T09:30:01Z")

</div>

Could you deselect few locators from Object properties. Try using one locator such as Xpath.  
Before that, could you add wait before click method

---

<div class="post-metadata">

**Author:** ![duyluong](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/duyluong/32/1116_2.png) [@duyluong](https://forum.katalon.com/u/duyluong)\
**Post date:** [May 26, 2017, 12:40pm UTC](https://forum.katalon.com/t/unable-to-perform-button-click-operation/6209/7 "2017-05-26T12:40:43Z")

</div>

Hi Raj,

Please check your script again, the script if you use `setText`keyword should be:

`WebUI.setText(findTestObject('test_object_id'), 'text', FailureHandling.STOP_ON_FAILURE)`

Thanks.

---

<div class="post-metadata">

**Author:** ![Balraj\_Alladi](https://avatars.discourse-cdn.com/v4/letter/b/b9e5f3/32.png) [@Balraj\_Alladi](https://forum.katalon.com/u/Balraj_Alladi)\
**Post date:** [October 31, 2017, 7:34pm UTC](https://forum.katalon.com/t/unable-to-perform-button-click-operation/6209/8 "2017-10-31T19:34:45Z")

</div>

![](https://s3.amazonaws.com/katalon-forum/editor/om/ljhtj7nghn0q.png)

[image.png](https://s3.amazonaws.com/katalon-forum/editor/om/ljhtj7nghn0q.png)

---

<div class="post-metadata">

**Author:** ![Jeffrey\_Kemble](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/jeffrey_kemble/32/11426_2.png) [@Jeffrey\_Kemble](https://forum.katalon.com/u/Jeffrey_Kemble)\
**Post date:** [August 7, 2018, 2:27pm UTC](https://forum.katalon.com/t/unable-to-perform-button-click-operation/6209/9 "2018-08-07T14:27:00Z")

</div>

> [Balraj Alladi](https://forum.katalon.com/profile/486/Balraj%20Alladi) said:
> 
> ![](https://s3.amazonaws.com/katalon-forum/editor/om/ljhtj7nghn0q.png)

Perfect solution!

---

<div class="post-metadata">

**Author:** ![Puneet\_Sood\_CNA](https://avatars.discourse-cdn.com/v4/letter/p/e5b9ba/32.png) [@Puneet\_Sood\_CNA](https://forum.katalon.com/u/Puneet_Sood_CNA)\
**Post date:** [September 19, 2018, 8:09pm UTC](https://forum.katalon.com/t/unable-to-perform-button-click-operation/6209/10 "2018-09-19T20:09:49Z")

</div>

I am not able to compile below Keyword in Katalon. Any suggestions please…

package com.utilities

import static com.kms.katalon.core.checkpoint.CheckpointFactory.findCheckpoint

import static com.kms.katalon.core.testcase.TestCaseFactory.findTestCase

import static com.kms.katalon.core.testdata.TestDataFactory.findTestData

import static com.kms.katalon.core.testobject.ObjectRepository.findTestObject

import org.openqa.selenium.WebDriver

import org.openqa.selenium.WebElement

import com.gargoylesoftware.htmlunit.javascript.background.JavaScriptExecutor

import com.kms.katalon.core.annotation.Keyword

import com.kms.katalon.core.checkpoint.Checkpoint

import com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW

import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords as Mobile

import com.kms.katalon.core.model.FailureHandling

import com.kms.katalon.core.testcase.TestCase

import com.kms.katalon.core.testdata.TestData

import com.kms.katalon.core.testobject.TestObject

import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WS

import com.kms.katalon.core.webui.driver.DriverFactory

import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI

import com.thoughtworks.selenium.webdriven.WebDriverBackedSelenium

import org.openqa.selenium

import internal.GlobalVariable

@Keyword

def clickUsingJS(TestObject to, int timeout)

{

WebDriver driver = DriverFactory.getWebDriver()

WebElement element = WebUICommonHelper.findWebElement(to, timeout)

JavaScriptExecutor executor = ((driver)as JavaScriptExecutor)

executor.executeScript(‘arguments[0].click()’,element)

}

---

<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:** [September 19, 2018, 8:21pm UTC](https://forum.katalon.com/t/unable-to-perform-button-click-operation/6209/11 "2018-09-19T20:21:27Z")

</div>

What is the error?

---

<div class="post-metadata">

**Author:** ![Puneet\_Sood\_CNA](https://avatars.discourse-cdn.com/v4/letter/p/e5b9ba/32.png) [@Puneet\_Sood\_CNA](https://forum.katalon.com/u/Puneet_Sood_CNA)\
**Post date:** [September 19, 2018, 9:08pm UTC](https://forum.katalon.com/t/unable-to-perform-button-click-operation/6209/12 "2018-09-19T21:08:05Z")

</div>

##### I am getting below message when hoovering mouse on WebUICommonHelper -

##### WebObject WebUICommonHelper - com.utilities.cfunction.clickUsingJS(TestObject, int)

---

<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:** [September 19, 2018, 9:44pm UTC](https://forum.katalon.com/t/unable-to-perform-button-click-operation/6209/13 "2018-09-19T21:44:25Z")

</div>

I suggest you read this entire thread carefully then try to implement the code as written properly. If you get an error, create a NEW, SEPARATE topic and follow ALL the advice I gave here:

> **[\[TIP\] My test is BROKEN!!! NOTHING WORKS!!!!!! PLEASE HELP ME!!!!!!!!!!!!!](http://forum.katalon.com/discussion/9337/tip-my-test-is-broken-nothing-works-please-help-me)**
>
> If you find yourself saying something like the title of this post, take a deep breath and relax.  Do that BEFORE you reach for the keyboard and BEFORE you start typing.

---

<div class="post-metadata">

**Author:** ![Puneet\_Sood\_CNA](https://avatars.discourse-cdn.com/v4/letter/p/e5b9ba/32.png) [@Puneet\_Sood\_CNA](https://forum.katalon.com/u/Puneet_Sood_CNA)\
**Post date:** [September 20, 2018, 3:00pm UTC](https://forum.katalon.com/t/unable-to-perform-button-click-operation/6209/14 "2018-09-20T15:00:13Z")

</div>

Thank you Russ, Will do as suggested
