Ask a Question

Modify operation during recording

easy-soft
Occasional Contributor

Modify operation during recording

When recording tests for VCL Delphi applications any clicks to TreeViews (and other controls) are registered using the caption of the clicked item. In our application we have dynamic captions for these controls but all items have stable internal IDs. I'd like to use these IDs during recording and playback of the tests. We have sub-classed these controls thus accessing internal details of these controls should be possible.

 

I already tried to implement a KDTOperation using a script extension. Unfortunately this does not help, as all the code is only executed after finishing the recording. At that time access to internal information of the controls is no longer possible.

 

Thus, what I want is, that the standard recording of a TreeView click (i.e. myTV.ClickItem('|item1|item1.2')) would be recorded as something like myTV.ClickItem('MyItemID'). During playback of the test, this recorded ID should be used instead of the caption.

 

Searching the forums and your documentation did not reveal any hints on how to solve my problem. Could you please give my any clues?

3 REPLIES 3
tristaanogre
Community Hero

Re: Modify operation during recording

I think, at this point, after recording, you'll have to manually go back and edit your recorded automation to use the indicated ID's.  ClickItem is a wrapper that TestComplete puts on the Tree control to execute the click item and it utilizes what is available at run time for the recording.  


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
Marsha_R
Community Hero

Re: Modify operation during recording

@tristaanogre  I know the id's need to be set manually, but would setting up Aliases also help out here?


Marsha_R
[Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
tristaanogre
Community Hero

Re: Modify operation during recording

An Alias would be for the tree object itself... there's no Aliasing for the items within the tree because they aren't separate objects... they don't show up in the object browser as separate objects so they can't be mapped....  At least, as far as I recall for VCL objects of this type....


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
cancel
Showing results for 
Search instead for 
Did you mean: