Hi @angelo.dabu
My post can help: How to use Global Variable directly in Object Repository URL
- Add Global Variable in Profile (“G_fileName”).
- Add Local Variable (“file” - to match yours URL) in request definition (Object Repository) and set type “Global Variable”. Select Global Variable, created in 1. in Default Value. This will link Local with Global.
- Loop in TC.
Code not tested, it is just idea:
import com.kms.katalon.core.testdata.TestDataFactory
import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WS
myData = TestDataFactory.findTestData('listOfFiles')
myData.allData.forEach()
{
GlobalVariable.G_fileName = it[1] //Yes you will get array
res = WS.sendRequest(findTestObject('fileRequestName'))
//Do what you need with res
}