Dynamic Url
- 5 years ago
Take a look at the Name Mapping section in here. You need your name mapping to be able to understand all those URLs.
https://support.smartbear.com/testcomplete/docs/reference/misc/using-wildcards.html
- 5 years ago
Hi,
Personally I would do it this way:
a) Create a string project variable of temporary type (with default value, say, https://aa.abc.avista.edu/GRT/page);
b) Depending on how you are going to execute your tests on another environments, consider how to assign the proper value to the above variable. Possible options: manually; from the command line as a custom parameter; read from configuration file; implement this or that data loop; etc.
c) Modify test code that starts browser and performs initial navigation so that the code uses the value of the above temporary project variable (which, by that moment, must contain correct value);
d) Revise NameMapping and remove site URL from the list of identification parameters for as many objects as possible. Investigate your tested application and find other unique, static and stable properties that can be used for this or that object identification and adjust NameMapping appropriately;
e) For the objects where URL as an identification parameter is required or highly desirable (can't think about anything else but Page), edit its identification parameters so that instead of static hardcoded value this parameter referenced the abovementioned project variable.