cancel
Showing results for 
Search instead for 
Did you mean: 

Having trouble getting Test Complete to recognize two different web pages

Highlighted
Not applicable

Having trouble getting Test Complete to recognize two different web pages

Hello,



I am working with an application in which you can click a link on Page1 which will open Page2. I then click some things on page two, close both pages and stop the recording. When I try to play back the test, it will get as far as opening Page2, but then will eventually return with an "Object does not exist" error. I discovered that this is because it is looking for the object on Page1, not Page2.



I opened the Name Mapping editor to attempt to see what the problem was. The objects I am trying to access on Page2 are listed under Page1, and Page2 seems never to have been recognized. I'm really not sure where to go from here. Could you give me some advice?



Thanks in advance,

Rachael
2 REPLIES 2
Highlighted
Contributor

Hello Rachel,



When we record our actions the automatic name mapping comes into play in TC and it dose that stuff automatically based on certain mechanism obviously. (May be something like - The combination of minimum number of properties that can uniquely identify the control Or something else) Whatever the mechanism is, I think in certain circumstances a case might arise where the recognition was done with  - Not the most appropriate collection of properties. In such a case you might have to go into the name mapping compare it with what is present in the object browser and validate the properties combination and their values used to recognize the control you want. You might need to do some changes - like adding another property, removing one or using regular expressions in the property values etc. After you are done with your changes try highlighting the control on the page. If the highlighting is done correctly your script should run with out any issue.




Thank you

Syed

Syed Ahmed Safvan

Highlighted

Hello Rachael,




The idea Syed suggested is correct:

>>> The combination of minimum number of properties that can uniquely identify the control Or something else




So, in your case, it looks like both pages meet the same minimum set of recognition criteria TestComplete uses during the recording. As a result, both pages are represented by the same Name Mapping item. However, during the script execution, the second page does not match the existing mapping criteria for some reason. So, please follow Syed's suggestion and check the mapping criteria - most probably, you will need to map the second page as an individual Name Mapping item and correct the recorded script.




Also, you can try refreshing the objects tree before the problematic line - it may appear that refreshing the references is enough to solve the problem:

  NameMapping.iexplore.pagePage1.Refresh

  NameMapping.iexplore.pagePage1.RefreshMappingInfo

-----

Alexander
Customer Care Manager
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

Get properties of a web page element

See replies!

Compare images using the Region Checkpoint

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