Usage of Regular Expressions for scripting dynamic object identification using VBscript
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.
Aliases.browser.AppName.Panel(5).Panel(1).Panel(0).Panel("UserPopup").Panel(0).Panel(0).Panel(Popup_Title).TextBox
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:
Aliases.browser.AppName.Panel(*).Panel(*).Panel(0).Panel("UserPopup").Panel(0).Panel(0).Panel(Popup_Title).TextBox
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.