Forum Discussion

Deeksha_goyal's avatar
11 years ago

How to make namemapping file variable

Hi All, I have 5 environment where i need to run my automated test with different URL. for now i have clonned the scripts and changed the name mapping file. But now if there is a change ...
  • jimpson's avatar
    11 years ago
    Depending on how your "environments" are setup (domains possibly??), you can use the "OnStartTest" event hanler to set an environment variable to the URL stub for testing.  This way, you could set "*" as the enviornment variable and then do a aqString.Replace(url, "/*", "/pageToDisplay.html") where you needed to reference the other pages.  Given the information you have provided, it's hard to say what an "environment" is, or how you could determine when you're in one of the five of them.