cancel
Showing results for 
Search instead for 
Did you mean: 

NameMapping - Can You Use A Project Variable And Add To It Like A Constant?

SOLVED
New Contributor

NameMapping - Can You Use A Project Variable And Add To It Like A Constant?

I am aware that you can use either a Constant or a Project Variable, but is there a way to use both?

For instance if I have multiple environments such as: www.mysite.com, www.dev.mysite.com, www.qa.mysite.com and my test goes to www.mysite.com/account/profile/update how can I do something along the lines of
(Property, URL)/account/profile/update so that the NameMapping and tests can be ran on all environments without changing anything but the URL?

I came from Ranorex and this was a normal thing, but I cannot seem to find it in TestComplete. Any help would be greatly appreciated.

2 ACCEPTED SOLUTIONS

Accepted Solutions
Community Hero

Re: NameMapping - Can You Use A Project Variable And Add To It Like A Constant?

Hi,

 

Considering your example, you may use www.*mysite.com* as a constant value for the URL property when mapping page object.

 

Regards,
Alex
[Community Expert Group]
____
[Community Expert Group] members are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Postings made by [Community Expert Group] members
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================

View solution in original post

Highlighted
Frequent Contributor

Re: NameMapping - Can You Use A Project Variable And Add To It Like A Constant?

You can use wild cards in the name mapping.

*.mysite.com* works for all of the cases you prested.

Also you can set project variables and use

URLValue = Project.Variables.MyURL + "/account/profile/update "

 

where Project.Variables.MyURL = *.mysite.com

View solution in original post

2 REPLIES 2
Community Hero

Re: NameMapping - Can You Use A Project Variable And Add To It Like A Constant?

Hi,

 

Considering your example, you may use www.*mysite.com* as a constant value for the URL property when mapping page object.

 

Regards,
Alex
[Community Expert Group]
____
[Community Expert Group] members are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Postings made by [Community Expert Group] members
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================

View solution in original post

Highlighted
Frequent Contributor

Re: NameMapping - Can You Use A Project Variable And Add To It Like A Constant?

You can use wild cards in the name mapping.

*.mysite.com* works for all of the cases you prested.

Also you can set project variables and use

URLValue = Project.Variables.MyURL + "/account/profile/update "

 

where Project.Variables.MyURL = *.mysite.com

View solution in original post

New Here?
Join us and watch the welcome video:
Final Interview in the Series
API_testing_mistake#7
Top Kudoed Authors