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
Highlighted
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
Highlighted
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 Hero]
____
[Community Heroes] 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. Posts made by [Community Heroes]
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.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================

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
Highlighted
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 Hero]
____
[Community Heroes] 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. Posts made by [Community Heroes]
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.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================

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:
Announcements
Top Kudoed Authors