avidCoder
7 years agoSuper Contributor
How to get all the propertyValues using code?
I am trying to fetch all the propertyValues together.. To fetch the propertyNames, I have tried this code and it works:-
import groovy.json.*
def prop = context.testCase.getTestStepByName("Properties");
propToGet = prop.getPropertyNames();
log.info propToGet
Similarly, I want to fetch the values also.
What is your use case?
How about the below?
def step = context.testCase.getTestStepByName("Properties") step.propertyNames.collect { log.info step.getPropertyValue(it)}