Web Table in Katalon Studio

TestData data = findTestData(‘CountryData’)
for(int excelRow=1;excelRow<=findTestData(‘CountryData’).getRowNumbers() ;excelRow++){
Country = data.getValue(“Country Name”, 1 )

This is working Fine Like Getting “Afghanistan” as output

But I want Header value Country Name should get printed , please guide me on how to get Header values


to get headers use 

//get instance of internal datafile
InternalData data = findTestData('SpamData/someSpamTestData')
//int colNumbers = data.columnNumbers

//get header names from the datafile, will return list of header names
def headerNames = data.columnNames
println "header names "+headerNames
1 Like

Working good thanks . Got

header names [Country Name, Country Code]

is that possible to implement as values?
like I need to use Country Name in Testcase


it’s a list, you need to iterate the list

I tried iterating in for loop but is not working, can you please guide me


def search = "Country Name"
def wanted = ""
for (String s : headerNames){
    //println ("header name "+s)
    if (s.equals(search)){
	println("this is wanted header name "+s)
	wanted = s
println ("wanted header name: "+wanted)
1 Like

Wow Got the Output Thanks a Lot