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?
Solved! Go to Solution.
Using wildcards for the URLs will help a lot. Here's some good documentation about that. Let us know if you have any more questions.
The issue that I'm running into is it can't find the parent objects if the page is different than when it was mapped. The identifiers appear to be good for the object itself, but since the URL is different, it can't find the parent information it is mapped with.
Yes, I understand that. Did you try using wildcards and it didn't work?
On the page I posted above
the top section mentions using wildcards in dynamic web pages:
The URLs of dynamic web pages (see Ignoring Query String Parameters
And it mentions wildcards in name mapping
Those sections have information that will be useful for you. Try these out and let us know what happened.
For this to work, I would edit the URL property for the page to include a *, correct?
I should then map all of the labels from that page for them to be available at all times from other pages.
I think it would cause issues if I were to add a wildcard to all of my pages, since our system seem to use trees that are not very distinct. Right?
What about using Conditional Mapping, https://support.smartbear.com/testcomplete/docs/testing-with/object-identification/name-mapping/cond... ?
For example, ObjectType equals 'Panel(0)' or 'Panel(1)' or 'Panel(2)'