Hi Team, I have been using TestComplete and TestExecute for running regression suite for my application. I am using Object browser to identify the exact object that I need for my scripting and add them into my script. I am using VBScript for coding the scripts. The objects will be present with multiple panels in the application and the Mapping Hierarchy would be something like this.
The number of panels may increase or decrease in different pages and the panel number within the parenthesis seems to be dynamic. Hence, Even If I save the above hierarchy in the name mapping, When I change the input values, the objects would not get identified and the script would fail.
Expected Name Mapping:
I request your suggestions on how to replace the panel numbers within paranthesis with regular expressions or there is a way to identify the required object consistently with much smaller names. Kindly do the needful at the earliest.
.... you don't.
You map each panel in the Mapped Objects panel of NameMapping, choosing properties that are non-dynamic to clearly identify the panel. Things like contentText, classname, etc., in combination can help with this.
You could also apply an "Extended Find" to the Panel(Popup_Title) (again, mapping Panel(Popup_Title in such a way to identify it properly) and completely remove all the other panels from your list. You'll take a bit of a performance hit but, depending upon your situation, that may work best.
Regardless of which way... your ALIAS does not have to match the Mapped object. You can excluded unneeded panels from your Alias so that it is simplified for the object usage within your automation.
Several years ago, we recorded the videos explaining how to use TestComplete to test dynamic objects. A lot of great features were added to TestComplete since that time. However, I think it will be useful to watch the video to understand the main concept: