If you have multiple and similar objects you want to quickly interact with during test execution, and you really don't want to spend time writing duplicate steps to interact with them, the approach below will help you reduce the time and make your code nicer:
Use CSS or XPath to locate your elements, and then you start changing the IDs (let's say). For example:
where 'i' is the loop counter. You can put it all inside of a loop that will read your excel sheet:
https://www.katalon.com/resources-center/tutorials/data-driven-testing/ for linking data with test.
Credit to Mate Mrse