Help to loop through a list of elements on a website

I’m quite new with katalon, but I have a problem i hop some can help with. I’m not sure it’s described thouroghly, but here is the problem.

I’m trying to test if a website have all the instances. For example: I have 4 online reporting services each on a different site, for each report I have to control if the correct value is listed on top of the page. For every test I have to go to the main site, and enter the repport site, and for every site the value are the same place.

Is it possible to do this automatically such that I don’t have to repeat the same test manually over again, but just loop such that it automatcally test the next site on the main site, until there isn’t anymore sites to test?

If i have understood you properly you might want to take a look at Loop statements (For and While) - Have a read through this document

I see how theloop works, but in theory; Is it possible to loop through sites on a website and test for the obejct for each site? Instead of manually making X number of tests in which you have to click on each site and verify the element.

This thread might be helpful

You can probably also use WebUI.verifyElementVisible(testObject)
Use an xpath to locate the elements you’re looking for via the testObject.

Consider using profiles to define different site domains and login credentials (if needed). From there, you can put your test case in a Test Suite, then put duplicates of that Suite into a Test Suite Collection each Suite can then be executed using each of the profiles you have defined. This should allow you to reuse the same test case and object references across multiple domains assuming they share similar source code.

Additionally, here’s a helpful link demonstrating looping over multiple objects within a Test Case.