String[] array = findTestData('Data Files/RandomData').getAllData()
for (def index : (1..5)) {
int random = new Random().nextInt(array.length)
println((array[random]).toString())
}
Hmmmm its kinda weird for me. I tried your code and I just replaced the “findTestData(‘Data Files/RandomData’).getAllData()” to a static string array values and when I print it, it doesn’t show any brackets… Maybe your values has a bracket?? if so you can try this approach…