just trying to delete all the testOjects in the UI. Basically, I’m using if statements… if statement will only repeat as many times as i say it…
so was asking if there’s a way to just use loop function to run my delete function according to how many of the testobject are found in the UI. Like if there’s 5 of the testobj, it would go thru the delete function 5 x until all the testobj are deleted.
So I’m basically checking if there’s the testobj on the page and if there is delete it… im basically duplicating the if statements 3 times… i mean it works if there’s 3 or less of those objects…
but was wondering if there’s a better smarter way of doing this. if we can apply some sort of loop functions after getting the total count of those test objects and for each count, execute that delete test case.
While you collect that, again I think there’s some confusion of terms here. Like when you say delete “test objects”. In the Katalon world, a “test object” is just a container for a locator that is eventually used to find an element in the web page that you are automating. I.e. test objects are all of the stuff in your Object Repository in Katalon. So when you say you want to delete those, that would mean deleting those items from Katalon itself, which I don’t think makes any sense. So if you can share your delete test case we can see what exactly you mean by delete test objects.
ya my bad… i cross-use the term web elements and testobj… i’m deleting the elements “financial_asset” from the UI. That’s basically what the delete_financials tc is. It’s a tc made up of several steps to delete the financials that’s in the UI.
So in this case, if I have 3 of those elements on that page, it would delete them one after the other.