Add tags from CSV file following a specific pattern

Hello Community,

I would like to ask for your help with a DDT test I am working on. I want to simulate adding tags to the html tag field from a CSV file.


CSV file

| Programming Langage | Framework Tags !
| Java | Spring, Spring Boot, Struts, Hibernate |

If I want to manually enter the tags in the tag field, I write the tag and press Enter. Tags will appear separately

However, when I do it through the Katalon Recorder, all the tags will come as a single tag and not separeted (which is obvious)

To achieve this, I want to build a logic that:

  • Count the number of tags in the CSV file

  • Find a way to separate them

  • Iterate through the tags and press Enter(like when it’s done manually)

***** Tags.html attached**
tags.html (2.6 KB)

Thank you!

1 Like


I find this doc guiding about KR tag. Hope this can give you some information

Your primary issue is unlikely to at all be related to the structure of your CSV file, or Katalon Recorder loading it, it’s extremely likely to be do with how you parse (input) the values into the web page.

Taking a stab in the dark here (not having access to your web page), it looks like it uses JavaScript events to ‘process’ each entry, whenever you hit Enter.

If it needs that JS to execute in order to allow you to properly input it, then you can try to simulate this via Katalon Recorder (including stuff like using SendKeys to do this) (How to simulate ENTER Key Press in Katalon Studio? - #2 by Luis_alberto_guzman1), and loop these steps (via loadVars/endLoadVars or storeCsv + while/endWhile) to iterate through your list (assuming you have a specific number of columns per line, even if some of the columns on some lines are empty).

The one complication you may have is that if your CSV has a different number of items per line in the CSV and you want to limit how many times it executes that code per line, in order to only loop a set number of times there are a few approaches to that, but others here may have an efficient approach that they could recommend for this particular area.