Labels not found if URL changes
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Labels:
-
Keyword Tests
-
Name Mapping
-
Web Testing
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
https://support.smartbear.com/testcomplete/docs/reference/misc/using-wildcards.html
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, I understand that. Did you try using wildcards and it didn't work?
On the page I posted above
https://support.smartbear.com/testcomplete/docs/reference/misc/using-wildcards.html
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
Using Wildcards in Name Mapping
Those sections have information that will be useful for you. Try these out and let us know what happened.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Marsha,
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?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I would try mapping the labels with a wildcard rather than the whole page. Put the wildcard in the part that changes each time.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is the part that it cannot find. How would I add a wildcard to that part of the parent?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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)'
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Rraghvani,
I'll look into that and give it a try if the webpage wildcard does not resolve my issue. Thanks!
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Let's see the URL from the label after it's changed
