Forum Discussion

essdee's avatar
essdee
Occasional Contributor
9 years ago
Solved

Parameterise domain in URL

Hi Guys,

 

I checked the documentation and it shows how to insert variables in a URL in Loadcomplete. However the tutorial shows an example like this: http://abc.com/@Variable1 where @Variable1 value is loaded from a variable.

 

If I want to put the domain name as a variable, preferably at recording time, is that possible? Consider the above URL example - I want to put a variable for abc.com, as the domain might change as the environment changes. So is there a provision in LoadComplete to provide such a URL at record time, as it is not feasible to change the domain variable name at all instances of requests and responses after the script is recorded. Or let me know if there is a easy way to change that post the script is recorded.

 

Thanks.

  • Hi essdee,

     

    You can easily change the domain name as the environment changes by altering the "Simulated Host" column in the Hosts table, which is below all of your pages/requests in the Scenario Editor.

     

    Please see this link for more details: https://support.smartbear.com/viewarticle/65046/

     

    Best Regards,

2 Replies

  • Hi essdee,

     

    You can easily change the domain name as the environment changes by altering the "Simulated Host" column in the Hosts table, which is below all of your pages/requests in the Scenario Editor.

     

    Please see this link for more details: https://support.smartbear.com/viewarticle/65046/

     

    Best Regards,

    • essdee's avatar
      essdee
      Occasional Contributor

      Thanks a lot Ryan, changing the host table worked.