cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic Url

SOLVED
Highlighted
Occasional Contributor

Dynamic Url

Thank you to the Smearbear Support group for helping me move forward 

I have couple of questions, hope some one can answer them 🙂 and thank you very much.

 

I want to use the same keyword test I have recorded for one environment (whose url looks like https://aa.abc.avista.edu/GRT/page)
in mutiple environments

this is how the urls looks in different environments
https://aa.abc.avista.edu/GRT/page
https://bb.abc.avista.edu/GRT/page
https://cc.abc.avista.edu/GRT/page

 

Q1) I have changed the navigate chrome browser value to https://*/GRT/page, but I am getting an error
This site can’t be reached
https://%2A/GRT/page
while running my keyword test

 

Q2) There are many objects that got recorded in the keyword script
eg: textusername, passwordbox, formloginform, link etc
each object has a property 'baseurl' value as 'https://aa.abc.avista.edu/GRT/page' under namemapping window

Do I have to edit the baseurl for each object to something like this
baseurl: https://*/GRT/page
for my keyword test to work on different urls? or is there a common area I can tell to use baseurl as https://*/GRT/page
for all the objects in the test?

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Community Hero

Re: Dynamic Url

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

View solution in original post

Community Hero

Re: Dynamic Url

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.

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================

View solution in original post

3 REPLIES 3
Highlighted
Community Hero

Re: Dynamic Url

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

View solution in original post

Community Hero

Re: Dynamic Url

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.

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================

View solution in original post

Highlighted
Community Manager

Re: Dynamic Url

Marsha, Alex, your input is appreciated!

 

@Saimahm Did you find the advice helpful? Please mark the best answer as a Solution


Sonya Mihaljova
Community and Education Specialist

Learn SmartBear products in a fun and easy way and prove your knowledge!
>>Participate in the TechCorner Challenge today
New Here?
Join us and watch the welcome video:
Announcements
Join TechCorner Challenge!
Want a fun and easy way to learn TestComplete? Try solving weekly TechCorner challenges and get into the Leaderboard!


Challenge Status

Compare images using the Region Checkpoint

See replies!

Converting UTC TimeDate in an Excel file

See replies!

Compare HTML table with Excel file and correct data in Excel file

Participate!

How to execute remote test and obtain results via Test Runner REST API

Participate!
Top Kudoed Authors