Stale element reference on button click

You can create a TestObject, then use it call :
WebUI.waitForElementVisible(findTestObject('your/object/path'), 5)
https://docs.katalon.com/katalon-studio/docs/manage-test-object.html#create-a-test-object

Or script the object

TestObject to = new TestObject()
String objectXpath = "//tr//td//img"
to.addProperty("xpath", ConditionType.EQUALS, objectXpath)

then WebUI.waitForElementVisible(to, 5)

Edit : you can also see this post to convert into TestObject :

2 Likes