How to click multiple time with same xpath in katalon

this code. doesn’t work

TestObject test21 = findTestObject(‘Object Repository/test2’)

if(WebUI.verifyElementVisible(‘test21’).TRUE)
{
for(int i = 0; i < 4; i++)
{
WebUI.click(findTestObject(‘test2’))

}

}

I got it. no need to add boolean inside the parameters.

if(WebUI.verifyElementVisible(‘test21’))
{
for(int i = 0; i < 4; i++)
{
WebUI.click(findTestObject(‘test2’))

}

}

I think not.

A TestObject is not a string so don’t put your TestObject variable in quotes.