title: Data binding Katalon dynamic rows
body: <p>I am trying to apply data binding to my test script.</p>
  <p>The test scenario is like this:
  --&gt; Test looks at the first row of the data file.
  --&gt; The test calls add to cart method by searching the first element. If there is another element, then it should call add to cart again with new element.
  --&gt; Test checks out and terminates.
  --&gt; Since I have applied data binding, the test triggers again automatically and this it uses the elements present in second row.
  --&gt; Second row has only one element, so this time the add to cart method should just run once.</p>
  <p><a href="https://i.stack.imgur.com/Q0Hnv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Q0Hnv.png" alt="enter image description here" /></a></p>
  <p>Currently I am using the following code,</p>
  <pre><code>List&lt;List&lt;String&gt;&gt; data = findTestData(&quot;Data Files/MultipleItemsList&quot;).getAllData();
  List&lt;String&gt; values = new ArrayList&lt;String&gt;();
  for(List&lt;String&gt; row : data) {
     values.addAll(row);
  }
  
  for (String el: values) {
      add_to_cart(el);
  }
  </code></pre>
  <p>Whats happening right now is that it stores all the three elements (2 on row 1 and 1 on row 2) in the string list and calls add_to_cart() method thrice, and then when the test triggers second time due to data binding, it again store the three elements in a list and call the method.</p>
  <p>Is it possible that when the test is run, then only row 1 elements are stored in a string that I can iterate through, and then when the test is triggered second time, it only saves single element from row 2 in a string.</p>