Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
180
Selecting a node using index in SwfTreeView
posted

Hi -

 

I am getting an error when trying to expand a node using the index in an object identified as SwfTreeView by QTP (Infragistics.Win.UltraWinTree.UltraTree).

QTP complains that the node with index 0 does not exist. However, the .GetItem(0) does return the text of the node with index 0.

The syntax  of the call is -

SwfWindow("Window").SwfTreeView("Tree").ExpandAll 0

 

Any ideas as to what am I doing wrong?

Parents
No Data
Reply
  • 7695
    Verified Answer
    Offline posted

       Primarily because ExpandAll and most TestAdvantage UltraWinTree actions do not use integer indexes as their arguments, they use either the Node Key, or a NodeTextPath.  It identifies the difference between the Key and the NodeTextPath, by the NodeTextPath will start with and is delimited by a double slash "\\" between each NodeLevel. You mentioned you were able to get the Text, if so, use that prefixed with "\\" and it should work. Either that if you were able to get the Text, you could also instead get the Key, and that would work as well.

    Let me know if that works for you,

Children