Ask a Question

Unable to record tree expansion.

SujithPrathap
New Contributor

Unable to record tree expansion.

I record the expansion of a swt tree. But when I try replaying the script the tree object does not seem to be recognised!!!



Please help me.

9 REPLIES 9
YMinaev
Staff

RE: Unable to record tree expansion.

Hi Sujith,



What exact control are you using (its name, vendor and version)? Also, can you post here the recorded code and the exact text of the error you get?



------
Yuri
TestComplete Customer Care Engineer

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
SujithPrathap
New Contributor

RE: Unable to record tree expansion.

I have attached the scripts asked for
YMinaev
Staff

RE: Unable to record tree expansion.

Hi,



I recommend that you try waiting for the target object before working with it (see the "Waiting for a Process or Window Activation" help topic).

------
Yuri
TestComplete Customer Care Engineer

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Robert_1
New Contributor

RE: Unable to record tree expansion.

Hi Guys,



I have the same problem...

We are evaluating testing tools and TC is one of the candidates (and a very promising one). Unfortunately, this issue could be a show stopper for us.

We work with Eclipse applications, but somehow TC cannot recognize tree elements (SWT) during replay.



The problem is not the delay time.

I have attached two screenshots:

* test.png - TC identifies the tree elements during the record (at least the nodes have correct values in the recorded test), but it is unable to find those elements during replay. I even tried the "Highlight on Screen" option while the SUT was open on my second monitor (so it was not covered by another window) but TC couldn't find it.

* TreeInEclipse.png - This is the SUT. The tree is there...



Jared, any suggestion?



Thanks in advance,

Robert
YMinaev
Staff

RE: Unable to record tree expansion.

Hi Robert,



Actually, this problem seems a bit strange. Do you use Name Mapping when you record your test (if you didn't change the default settings in TC, you probably do)? If so, there may be a recognition issue due to the unreliable NM scheme. I recommend that you check what properties the target control is mapped by (see the "Name Mapping Editor" help topic) and exclude properties that can change their values (such as indexes, for example).

------
Yuri
TestComplete Customer Care Engineer

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Robert_1
New Contributor

RE: Unable to record tree expansion.

Hi Jared,



Thank you for your prompt answer and sorry for my delay. I just came back to my evaluation task.



I've made a strange observation with this issue: if I try "Highlight on Screen" from the Mapped Objects window, it will say "Unable to highlight this object on screen because it is not visible." However, if I select "Show in Object Browser", it will locate that object and if I call "Highlight on Screen" in the Object Browser window, it will be highlighted.



MappedObjects.jpg -- Name Mapping window, unable to highlight

ObjectBrowser.jpg -- Object Browser window, the object will be highlighted. (This object was located from the Name Mapping window.)



I deleted all indices from all objects in the Mapped Objects window and now, if I try to highlight the last tree element on screen, I get the message: "The underlying object does not exist."



What do you think?

Robert
Robert_1
New Contributor

RE: Unable to record tree expansion.

note: the index deletion was another experiment, it has nothing to do with the first part of my previous post (with the Name Mapping and Object Browser windows). I deleted those indices afterwards.
Robert_1
New Contributor

RE: Unable to record tree expansion.

New info on the screenshot!
YMinaev
Staff

RE: Unable to record tree expansion.

Hi Robert,



According to ObjectBrowser.jpg, the problematic object's class is SysTreeView32 (see the WndClass property). This seems to be the problem - the object is mapped by another property with another value. I suggest that you delete this object from your NM scheme and try remapping it manually.

------
Yuri
TestComplete Customer Care Engineer

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
cancel
Showing results for 
Search instead for 
Did you mean: