Skip to content

Changing the URL of Website being Tested

Question

We are in the process of adding a new testing server that we would like to be able to run automation scripts against. I just wanted to see if there is a process documented for converting scripts and objects to point to a different web address?

You do not need to convert scripts and objects. You can keep the script the same and just add the following code at the start of the test:

Navigator.Open('http://www.website.com');

or using a variable:

g_webSiteBaseUrl = 'http://www.website.com';
Navigator.Open(g_webSiteBaseUrl);

The variable may be defined by external execution engine like SpiraTest.

See Also