nameMapping- How to pass project variable in the namemapping xpath
I thought I saw somewhere but can't find the answer for this again. I am trying to pass variable that's defined in the project Temp variables section and combine with a text.
for ex: Xpath = //div[.='abcd']
I want something like
Xpath = //div[.=Project.variables.myText]
Same for url
This URL will be different from Lower environment to Prod. So I can't just user * in the url part.
Thanks for the reply. I am looking to pass variable in to nameMapping repository. I know how to do with in the script. But my project is in Keyword test and I need to pass URL for page and some test data for objects.
Sorry, If I confused you. I want that variable to be used in the nameMapping window as shown in below. I saw in one of the post sometime back that only project variables can be used in the nameMapping objects. but can't find that exact syntax. The below syntax is not working for me.
I found this page with an example, but still TC is not able to find the page object
Project.Variables.MyURL = "https://ea-webapp-dev-raven.com/"
Not sure whats wrong I am doing here. Can someone please help me
I don't know if this will help.
or this link
Sorry that I'm not a better help.
Here's an example using Code Expression,
Project.Variables.MyVariable is set to "https://community.smartbear.com", and I want to add "/t5/TestComplete/ct-p/TestComplete_forum". The URL will then come "https://community.smartbear.com/t5/TestComplete/ct-p/TestComplete_forum"