I created a Test Case in Katalon Studio 8.2.5 and I’d like to pass a lot of variables into it using a map.
I am calling the TestCase as follows:
Map<String, String> config = [
('addressPickupPlace'): 'AUTOFILL',
('contactPickupPlace'): 'REQUIRED'
]
Map<String, String> data = [:]
WebUI.callTestCase(findTestCase('path/to/test_case'),
[('fieldConfig') : config, ('fieldData') : data], FailureHandling.STOP_ON_FAILURE)
However, I have no idea on how to access that map or rather the values inside it.
I looked on the documentation, but have only found guides on how to access String TC variables.
I have tried to access addressPickupPlace using:
"$fieldConfig".addressPickupPlace
"$fieldConfig"[addressPickupPlace]
"$fieldConfig".get('addressPickupPlace')
This results in:
groovy.lang.MissingPropertyException: No such property: addressPickupPlace for class: org.codehaus.groovy.runtime.GStringImpl
I have also tried:
$fieldConfig.addressPickupPlace
$fieldConfig['addressPickupPlace']
$fieldConfig.get('addressPickupPlace')
This results in: groovy.lang.MissingPropertyException: No such property: $fieldConfig for class: Script1676977203533
I am now out of ideas. Can anyone help me?