Forum Discussion

schwarz's avatar
schwarz
Occasional Contributor
11 years ago
Solved

TestObj.FindAll()

We use this method: TestObj.FindAll(PropNames, PropValues, Depth, Refresh) for testing Delphi VCL Application, Refresh = true.



Usually, it works very well but sometimes it occures that objects



1. which  are returned are shown at a  wrong hierarchie level. In this case, when I examine the object tree in the object spy, the object tree changes after a moment to a slightly different (and I assume correct) structure.



2. have wrong properties, e.g. "Visible = False" (although they are visible according to the object inspector)



This can be solved by performing a "dummy" search before:



TestObj.FindAll("Name","dummy", 100, true);



After this call, the objects are found correctly and their properties are as expected. It´s no timing issue or similar, seems to be anything related to object tree caching, but I don´t know.



Can anyone help? Are these known issues?



Regards... Jens Schwarz

4 Replies