Object can\'t be found
I am evaluating Testcomplete 3 and experienced one problem.
One of my app control (and his properties) can be viewed in the object browser but can't be found by Object Properties or the Store Object Properties of the toolbar tools.
The goal being creating a check point of this control's content, I've tried to use the contextual menu and the command "Store Object Properties" from the Object Browser. I copy the compare code generated, in my script. But when the test replay, the object can not be found either and test crashed.
How to use what Object browser can see?
This is the code :
Set p = Sys.Process("assaisie")
Set w = p.Window("#32770", "Pointage Intragroupe", 1)
'generated by store object properties
If Not Objects.Compare(Sys.Process("assaisie").Window("#3 2770", "Pointage Intragroupe", 1).Window("tablist", " M.conso. M.locale Compte M.transac. Différence", 4), "rappro1") Then
Log.Error "Objects are not identical"
The error is that the "Window("tablist", "....)" can not be found.
My app is an non opened app but i tried opening it without more success.
Thank you for your help.
Re: Object can\'t be found
As we see from the posted code, index of the object Window("tablist", " M.conso. M.locale Compte M.transac. Difference", 4) is 4. Perhaps, the number of windows that have the "tablist" class and the " M.conso. M.locale Compte M.transac. Difference" caption can change from one application run to another. In such a case you need to check whether the needed window exists.
If this advice does not help you solve the problem, please do the following: Insert the following code in your script before the If Not Objects.Compare(...) line:
</font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;"> Set w = Sys.Process("assaisie".Window("#32770", "Pointage Intragroupe", 1)
Log.Message(w.ChildList)</pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">Then execute the script and send the results of its execution (the Results folder) to our support team (firstname.lastname@example.org). Please send your TestComplete project as well.
Re: Object can\'t be found
Thank you for your answer.
We finally have found a workaround that is : capturing the entire window [Window("#32770", "Pointage Intragroupe", 1] and his childs. Our tablist is in the list!
Selecting (by check boxes) only this parent window and the child window "Tablist" in the Save Objects Properties window, it works.
A large part of our application can be tested on this way. And TestComplete could become in a couple of days our new testing tool [img]images/icons/wink.gif[/img]