danielmbanks
8 years agoOccasional Contributor
Solved
How to access RunContext properties
If I have added a property to the runContext e.g.
testRunner.runContext.setProperty('myProperty', 'example data')
And I want to access this property in an assertion in a later step, is ${=context.myProperty} the only way to get the value?
It just seems weird that the syntax is different from the standard style e.g. ${#TestCase#myProperty}
Hi Danielmbanks,
The syntax is different because you are accessing to different objects. The context object is available only inside the test execution. Here, the property may have a completely different value (in comparison with the one specified in the TestCase) depending on how you work with it (change its value during the test).
The second example gets value from the TestCase of the current project.
So, theoretically, you can use any objects in your test.