Reassigning Objects After Removal

Hello,

I worry that this question is a duplicate, but I am struggling to find a good search term to find it. Hopefully, any answers will be useful to others.

I am using Katalon studio and I am trying to set up a loop that will repetitively delete the top element in a table. Because the first row in the table is found with the same xpath each time, I am hoping to be able to reuse the same object from the object repository to represent it. However, after the first iteration completes, it claims that the object is stale.

Is there some way to refresh the object assignment between each iteration? This would be easy in selenium, but Katalon has abstracted away the means of doing that.

Thank you for any help.

It turns out that my question was the result of me incorrectly diagnosing what katalon was doing.

This was (in part, at least) a timing issue. Katalon does, in fact, reassign its objects. My only issues were common ones. Timing and object locators. Some of the locators were different from what was on the page and the test sometimes moved to quickly for the page to change. Once I added some delays (I already had explicit waits) and fixed the locators, all indications of this problem disappeared.

Maybe what happened was that, as the test progressed, the test did not reassign the objects because the old objects had not been cleaned out yet, albeit they were no longer visible. Not sure.