Forum Discussion
nmrao
9 years agoChampion Level 3
Property transfer is not required.
If possible define a custom property for file name at test case level, so it can be used in any test step of the test case.
From Groovy Script:
def filename = context.testCase.getPropertyValue('FILE_NAME')
From other step, it can be accessed using property expansion such as ${#TestCase#FILE_NAME}
If you want to explicitly set the file name in one groovy script, then use below command to set the value at test case level custom property
context.testCase.setPropertyValue('FILE_NAME', '/absolute/path/of/file')
And by now, you already know how to access the above value in any other steps of the same test case.
Related Content
Recent Discussions
- 7 days agoemoya