Forum Discussion
Dmitry_Nikolaev
14 years agoStaff
Hello Lane,
A similar problem was fixed in TestComplete 8.50. However, if you cannot update to this version for some reason, use the following script as a workaround:
path = "|Desktop|My Computer|Local Disk (C:)|TestCompleteScripts|App9.11.10|AppRegressionTests|SupportingFiles"
Call ExpandPath(treFolder, path)
Call treFolder.ClickItem.ClickItem(path)
Sub ExpandPath(TreeView, path)
Dim items, treeItems,itemFound
Dim i, j, start
items = Split(path, "|")
TreeView.Refresh()
Set treeItems = TreeView.wItems
itemFound = True
Log.Enabled = False
start = 0
If items(0) = "" Then
start = 1
End If
For i = start to UBound(items)
Dim currentItem, timeout, time
Set currentItem = Nothing
timeout = 20000
time = Win32API.GetTickCount()
While(Win32API.GetTickCount() - time < timeout AND currentItem Is Nothing)
For j = 0 to treeItems.Count - 1
If( treeItems.Item(j).Text = items(i)) Then
Set currentItem = treeItems.Item(j)
Exit For
End if
Next
Wend
If(Not currentItem Is Nothing) Then
currentItem.Expand()
Set treeItems = currentItem.Items
Else
itemFound = False
End if
Next
Log.Enabled = True
If NOT itemFound Then
Log.Error("Item not found: " + items(i))
End If
End Sub
Does this help?
Related Content
- 7 years ago
- 2 years ago
Recent Discussions
- 2 days ago
- 2 days ago
- 5 days ago