get and output consecutive values from an excel file to the text input line

Hello.I need the values from the list to be substituted sequentially and continuously. Randomly with a range of numbers doesn’t suit me. It is also necessary with a range, but in sequential order. I was looking for an answer on third-party websites and forums and could not find the right one (Please help me write the necessary script.
WebUI.setText(findTestObject(‘Routes and busstops/Page_/Name OP’), findTestData(‘Busstops’).getValue(1, + RandomUtils.nextInt(1,

Am I on the right track with something like below? This gets a Random Number to start and then runs with the next 10 items from that start. Play with it as you want if you think it will assist.

import java.util.Random

int upperLimit = 2301 - 10
int choice = 0

Random rand = new Random()

choice = rand.nextInt(upperLimit)

for (int cnt = choice; cnt < choice + 10; cnt++) {
    WebUI.setText(findTestObject('Routes and busstops/Page_/Name OP'), findTestData('Busstops').getValue(1, cnt))


Hello. The point is not in random calculus. And not in random numbers. My goal was to ensure that the test case picks up data from each line of the excel file and substituting it alternately into the text input window. In fact, I have already solved the variable problem and looping at the input step.

But thanks anyway