Forum Discussion
Ravik
11 years agoSuper Contributor
Hi, Could you please give me a sample code for how to use project variable while adding object in name mapping file and how can we use it. Thanks Ravik
TanyaYatskovska
Alumni
11 years agoHi,
To add a project variable as a mapped property value, do the following:
- Select an object in the Name Mapping editor. You will see its identification properties on the right.
- Select a property, press F2 and then click the ellipsis button in the property value cell. The Edit Property Value dialog will appear:
- Select Mode = Project Variable and specify the variable you want to use to identify this object.
In your test, use the following code to assign a project variable:
Project.Variables.Var1 = "some value"
If you use a keyword test, add the Set Variable Value operation - http://smartbear.com/viewarticle/56300/