# How To Create Repeat Looping But Read Next Row

**URL:** <https://forum.katalon.com/t/how-to-create-repeat-looping-but-read-next-row/62334>\
**Category:** Web Testing\
**Tags:** katalon-studio\
**Created:** [February 8, 2022, 4:25pm UTC](https://forum.katalon.com/t/how-to-create-repeat-looping-but-read-next-row/62334 "2022-02-08T16:25:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![marvinaj12](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/marvinaj12/32/11979_2.png) [@marvinaj12](https://forum.katalon.com/u/marvinaj12)\
**Post date:** [February 8, 2022, 4:25pm UTC](https://forum.katalon.com/t/how-to-create-repeat-looping-but-read-next-row/62334/1 "2022-02-08T16:25:45Z")

</div>

Hi Guyss I’m Stuck When Making Repeat Loop Condition so i want to make the test case  
Looping Inputing Form So When Execute 1 form is not close browser repeat input but insert first then and match to excel count row

and the problem is execution is looping with test suite and only read 1 row from excel files here is my script

```
 `for (row = 1; row <= findTestData('DataTest1').size(); row++){  
  WebUI.setText(findTestObject('Page_React App/input_User Name_userName'), username)

  WebUI.setText(findTestObject('Page_React App/input_First Name_firstName'), firstname)

  WebUI.setText(findTestObject('Page_React App/input_Last Name_lastName'), lastname)
  
  WebUI.setText(findTestObject('Page_React App/input_Email address_email'), email)

  WebUI.click(findTestObject('Page_React App/button_REGISTER'))
  }

```

`

---

<div class="post-metadata">

**Author:** ![grylion54](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/grylion54/32/16265_2.png) [@grylion54](https://forum.katalon.com/u/grylion54)\
**Post date:** [February 8, 2022, 6:01pm UTC](https://forum.katalon.com/t/how-to-create-repeat-looping-but-read-next-row/62334/2 "2022-02-08T18:01:02Z")

</div>

Have you tried it like this OP did? Except, you have to replace the number, like 1, with your variable, “row”.

> [@Read Test Data from Excel](http://forum.katalon.com/t/read-test-data-from-excel/25229/3):
>
> Thanks Timo for your help!!! I was using findTestData( ) and getValue( ) methods from katalon studio API. below is snippet: WebUI.setText(findTestObject('Object Repository/Page\_Login Salesforce/input\_Username\_username'), findTestData('Automation Test Data').getValue( 'UserName', 1)) WebUI.setEncryptedText(findTestObject('Object Repository/Page\_Login Salesforce/input\_Password\_pw'), findTestData('Automation Test Data').getValue( 'Password', 1)) If I have to…

Maybe like:

```auto
WebUI.setText(findTestObject('Page_React App/input_User Name_userName'), findTestData('DataTest1').getValue('username', row))

```
