String[] arPath = Path.split("->"); String finalPath = ""; for (int i = 0; i " + arPath[j]; else finalPath = arPath[0]; if (i == (arPath.length-1)) UltraTree().click(atPath(finalPath + "->Location(CAPTION)")); else UltraTree().setState(EXPAND, atPath(finalPath)); sleep(2); }
Hi Shaule
I have tried Click(AtPath(path)) and it worked for me as long as the path is correct. This action took care of expanding and collapsed node in the path. I was using the latest build of TestAdvantage 2009 Vol 1, what version and build number are you using? This might be a fixed bug that was released after product RTM.
Regarding finding if a node can be expanded or not, I’ve created the attached script to demonstrate this. I’m only looping through the root nodes collection but this script can be modified to recursively loop through all nodes while constructing the paths to test a click on each and every node in the tree.
Let me know if you need any help
Ammar
What is the line of code that it stops on? If you can provide me with a sample application I should be able to provide a solution for this issue.
Regards,