Ask a Question

Labels not found if URL changes

SOLVED
KevinStanley
Occasional Contributor

Labels not found if URL changes

The web testing that I'm performing has labels on down the left side of the page, which are always available and expand when clicked to show additional sections. When I click one of the sections, the URL changes, but the UI remains the same. If I map a label, it maps it to a specific page, which changes depending on the section I choose. Therefore, if I try to have test complete click one of the labels after the URL changes, the object cannot be found because the parent (the page it was mapped from) is not present. Is there a way to map the labels so that they can be found when the URL makes it look like I'm on a different page?

14 REPLIES 14
KevinStanley
Occasional Contributor

I selected one of the items that I was having problems with using the objectspy. Here you can see the URL and full name. It is using the ObjectLabel as the identifier, but if the parent information (webpage) is not correct, TC can't find it. That's why I was thinking that using the wildcard to negate any changes after ****.com/ would work. It seems to be working for now, but as I write more tests, I hope it doesn't cause any issues.

KevinStanley_0-1652295875473.png

 

rraghvani
Champion Level 3

Try to use wildcards and conditional mappings. Here's an example (not great), using Extended Find, to identify the SmartBear logo in community.smartbear.com and smartbear.com

 

URL

rraghvani_0-1652344494090.png

 

Object

rraghvani_1-1652344558533.png

 

 

KevinStanley
Occasional Contributor

It looks like a blanket wildcard for the webpage isn't the best answer, although things are working at this time. All new objects are being mapped to the abc.com/* instead of the actual page (abc.com/productspage). I'm testing the conditional mappings for the pages now, Rraghvani.

Hi @KevinStanley  - 

 

Another option is to use conditional mapping, you can allow for the common objects on several different pages by using this option. Please see link for additional information: 

 

ebarbera_0-1652365276579.png

Once you have selected this option you can allow for multiple URLs. 

ebarbera_1-1652365389512.png

 

 

 

KevinStanley
Occasional Contributor

I think that's the route I'll take. The particular items I'm worried about will be mapped to many pages, which I can just add as I write my tests.

cancel
Showing results for 
Search instead for 
Did you mean: