cancel
Showing results for 
Search instead for 
Did you mean: 

wait for SysTreeView32 item to appear

Highlighted
New Contributor

wait for SysTreeView32 item to appear

Hello,



Is there any way to wait for SysTreeView32 node to appear without getting an error...?

SysTreeView32 items do not have Exists property



WaitWindow or WaitChild are not working...



thanks

🙂
4 REPLIES 4
Highlighted
Staff

RE: wait for SysTreeView32 item to appear

Hi,



Exactly how are you using WaitWindow?

------
Yuri
TestComplete Customer Care Engineer

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

RE: wait for SysTreeView32 item to appear





Aliases.Dialog_ThingsViewer.WaitWindow("SysTreeView32","Tree1",1,10000)

this works only for waiting for the tree



if i want to access items in the tree i can do it like this:

Aliases.Dialog_ThingsViewer.tree_BigThings.wItems.Item(item_name_or_index)

this return Item object (Win32TreeViewItem) that has no Exists property, so i cant test whether it already exist or not

the same way wItem that returns a Collection Object (TreeViewItemCollection) of items that has no property or method to check whether it has some item or not...



tree_BigThings is the mapped name for ("SysTreeView32","Tree1",1) in Dialog_ThingsViewer




am I missing something?
Highlighted
Staff

RE: wait for SysTreeView32 item to appear

Hi,



If you want to check whether an item exists in the tree, you need to search for it within the tree items by iterating through them and comparing their captions with the needed one. The tree items do not have the Exists property since they're internal objects of a control, and they're not shown in the object tree.

------
Yuri
TestComplete Customer Care Engineer

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

RE: wait for SysTreeView32 item to appear

Yep, i thought about searching. However it may be very slow sometimes and require extra loop. I hoped that there were some more compact ways to do that.



Maybe there is a way to convert TreeViewItemCollection into string and then use some string lookup method. I'm not sure if it is a faster way though.

New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors