Not able to click on Button Using Katalon studio


#1

Hi,

i am not able to ciick on one button ,getting this below error.

Element is not clickable at this point.

any suggesstions to over come this issue.


#2

#3

There are many post here in Forum that solves your issue. In my case I had the same problem where Click keyword was not working on some buttons but on some buttons it was working. So based on the help from Forum I created a custom keyword with below code and tried to click the same element using the Custom Keyword “Click using Java Script” . It worked fine. Give it a try :

package clickusingjavascript

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 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.keyword.WebUiBuiltInKeywords as WebUI

import internal.GlobalVariable

import org.openqa.selenium.WebDriver as WebDriver

import org.openqa.selenium.WebElement as WebElement

import org.openqa.selenium.interactions.Actions as Actions

import com.kms.katalon.core.webui.common.WebUiCommonHelper as WebUiCommonHelper

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

import org.openqa.selenium.JavascriptExecutor as JavascriptExecutor

@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)

}


#4

Try adding Delay(0) before executing the click action, it may help