vex
13 years agoContributor
Help with advanced namemapping
I have a test that I have to run on multiple environments whos URL changes often. I can't figure out how to easily add or remove urls for each namemapped page.
For example, I might have one like this:
However, this URL could change to "https://*-web.env*.sys*.net/agent*/download" even though I want the same namemapping tree for both pages. The domain is the only thing that changes -- in my case, /agent*/download will always be there.
I know I can do this via conditional namemapping, but I'd rather not add lots of different strings. I wanted to just create a variable where in my script I can set the appropriate format during runtime, but namemapping doesn't seem to support both variables and text for a namemapping value. I just want to be able to do something like Project.Variables.NameMappedHome & "/agent*/download"
Is there an easier way I can do this besides namemapping all of these things?
For example, I might have one like this:
NameMapping.Sys.WebBrowser.pageHome
Property: ObjectType = Page
AND
Property: URL = "https://*home*.website.com/agent*/download
However, this URL could change to "https://*-web.env*.sys*.net/agent*/download" even though I want the same namemapping tree for both pages. The domain is the only thing that changes -- in my case, /agent*/download will always be there.
I know I can do this via conditional namemapping, but I'd rather not add lots of different strings. I wanted to just create a variable where in my script I can set the appropriate format during runtime, but namemapping doesn't seem to support both variables and text for a namemapping value. I just want to be able to do something like Project.Variables.NameMappedHome & "/agent*/download"
Is there an easier way I can do this besides namemapping all of these things?