Need to iterate the test cases according to the occurance of cell data in a column

Hi all, I need to iterate the test cases according to the occurance of data in cells of a column.
For example in excel column A has ‘login’ word in 3 cells and ‘add’ in 2 cells of same column so need to iterate login test case 3 times and add test case 2 times with different set of data.

@vidushi.mittal

I am not sure how you can achieve this using a keyword or programatically but you can do something like this “data binding” to achieve the same objective.

the best option i have in mind right now is to re-organize your test data, split it in to files, one for login and one for add (it can be the same file but different sheets).
at the data binding, add both test data source and select ‘many to many’ - that should iterate on login first and for each login value iterate on ‘add’ values
other option: do everything programaticaly in the testcase, using findTestData()

LE: i think the data can also stay as it is if you select exactly what column you need, but i am not sure if you can add same file twice in data binding

check here for inspiration on test data relationship:

https://docs.katalon.com/katalon-studio/docs/design-a-test-suite.html#test-data