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 Silk4J 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 void test() { TestObject commonRootNode = desktop.find("//Node[@id='1']"); commonRootNode.find("/Leaf[@id='2']"); commonRootNode.find("/Leaf[@id='3']"); commonRootNode.find("/Leaf[@id='4']"); commonRootNode.find("/Leaf[@id='5']"); }