When testing applications with a complex object structure, for example complex web applications, you may encounter performance issues, or issues related to the reliability of your scripts. This topic describes how you can improve the performance of your scripts by using different locators than the ones that Silk4NET has automatically generated during recording.
Root Node id=1 Leaf id=2 Leaf id=3 Leaf id=4 Leaf id=5 Node id=6 Node id=7 Leaf id=8 Leaf id=9 Node id=9 Leaf id=10
Public Sub Main() Dim node As TestObject node = _desktop.Find("//Node[@id='1']") For i As Integer = 1 To 4 Step 1 node.Find("/Leaf[@id='"+i+"']") Next End Sub