Ask a Question

URL does not refresh for page that has a different public link

SOLVED
sedens
Occasional Contributor

URL does not refresh for page that has a different public link

Hello, I have a web application that passes encrypted information in the URL so when I pass info to this page the URL is different each time because of the encrypted information in the URL, for example: https:www.example.com/publicLink/Abc938485458dDKKjfjf etc. This gets mapped in the Name Mapping repository as "pageAbc9384" with that specific URL. 

 

I have a property checkpoint on that page to check it contains the information I'm expecting. However, when I run the test, it keeps saying the object "pageAbc9384" does not exist.

 

I have added RefreshMappingInfo to that page in my test but that does not seem to refresh the URL as the property checkpoint line still throws an error. Is there any other property/object/function I can use to refresh the URL each time the page is loaded so that it picks up the new public link on page load?

 

Any suggestions appreciated!

 

Thanks. 

4 REPLIES 4
npaisley
Staff

Hi @sedens!

 

I think the easiest solution here would be to handle the dynamic data of your parent URL, this way the objects that are being validated can be found even when the URL changes. 

 

We can apply a wildcard to any dynamic data in TestComplete by using an asterisk (*). 

For instance, you could remove the encrypted portion of the URL in the Parent mapping and replace it with a wildcard, i.e. = www.example.com/publicLink/*

 

In my example below I altered the parent URL of an object I am validating to handle a dynamic section. This way my checkpoint will still work on any object under this URL as along as the areas before and after the wildcard still match.

npaisley_0-1650050086026.png

 

Here is the doc on using Wildcards;

https://support.smartbear.com/testcomplete/docs/reference/misc/using-wildcards.html

 

I hope this helps!

 


Regards,
Nick

Solutions Engineer @ SmartBear
sedens
Occasional Contributor

I'm not sure how this answer is relevant to my query. I am not using a react app in an S3 bucket. Perhaps you replied to the wrong question?

sedens
Occasional Contributor

Thank you! That wildcard suggestion worked. Your help is much appreciated.

Hi @sedens!

 

Thanks for letting us know that helped! Happy Testing!


Regards,
Nick

Solutions Engineer @ SmartBear
cancel
Showing results for 
Search instead for 
Did you mean: