I posted this on TDForums and though I would post here as well.
Please forgive me if I am posting in the wrong area/forum.
Would like to ask all people if they have/had a similar situation where the Terminal Emulator addin is concerned (and testing a Maineframe system where panel names are dynamic).
First things first...
1. Attachmate EXTRA! 6.2 (I know, this is old, but getting a new version is not an option).
2. QTP version 11 and QC/ALM version 11.
3. OS is Windows XP
During playback of a script created against a mainframe application, the playback often fails because an object does not exist in the object repository.
1. Created basic script using within QTP using the record function.
2. Modified said script so that it reads data from the global data table (data driven test).
The objects (TeWindow, TeScreen, and TeField) are added to the Object Repository automatically during the initial recording.
The AUT in question basically creates a recipient (we'll say basic demographics -- full name, address, phone, etc).
Using the fullname as an example, the recipient is created on TeWindow("TeWindow").TeScreen("screenDemographics" ).TeField("FullName"). The initial run works great.
Running the script again (using the same data) takes the user to another panel (screen) that says there are potential duplicates (listing the originally created recipient).
This is fine -- we add that panel to the repository (let's say it's called TeWindow("TeWindow").TeScreen("Duplicates1")) and we ignore the duplicate error condition, thus successfully adding the recipient a second time.
Running the script a third time fails stating that the TeScreen is not in the Object Repository. This is because the TeScreen in question dynamically changes. It is now showing as TeWindow("TeWindow").TeScreen("Duplicates2"). We now have two potential duplicate recipients.
I have found some articles (when dealing with dynamic panel changes) that a possible solution would be to use DP (Descriptive Programming). This does not work in our environment (I am familiar with DP and use it with our websites -- DP against a terminal emulator does not work as well, at least in our case).
Other articles suggest defining the objects in the Object Repository using RegExp (Regular Expressions).
Using an example (in the repository), I set the TeScreen object "label" property as (without quotes) "\w" (and checking the Regular Expression checkbox). Still does not work.
Still yet other articles suggest using the "ObjectRepositoryUtil" object to add new objects during runtime. This only works (according to the articles and help file) when working outside of QTP. If there is a way to use this within QTP, I would prefer that.
And still (yet), there are articles that suggest writing object properties into the data table and then reading them when needed within the script (I will admit, I need to do more research on this -- though I have my doubts that this will work -- call me a pessimist).
1. Does anyone have a similar problem?
2. What have you done to overcome it?
3. Can you provide script samples if you have overcome it?
Or step by step instructions (in the case of using RegExp in the Repository) -- with this though, I feel I have configured this correctly, but maybe I just missed something.
Any input/guidance would be greatly appreciated.
If you need more information, please do let me know...
So the TeScreen Object when recorded has plenty of attributes/properties (you can view them with Object Spy). When you add this object to the repository you can choose which attributes you want QTP to validate the screen for. I work with Hummingbird instead of Attachmate, and I have a unique Screen ID for each TE screen. So I simply delete all the other attributes to check against.
When adding the TeScreen Object to your repository, you can ask it to look for a Ford Mustang (which is what I think you want to achieve), or you can ask it to look for a Red Ford Mustang with a VIN of 1NV204400004 OR a Year of <RegExp> (which is what I think its doing).
Hope this helps.
No sense bein' a grifter if it's the same as being a citizen.