I had a scenario to automate a script where i need to get the child items to be selected from the swftreeview, which is of gridtree,
For example Java is the root tree and in that j22e, veriosn of java, version of J2ee these are the child elements of the Jave i need to get the version of java now that is the child element of java in the save way i need to get the grandchild elements also.Please try to help me regarding this, It would be very great to share with me if you have any idea regarding this. Please let me know so that i can go ahead with this
Its very urgent, Please try to help me out
What you are asking is possible, although it will take a bit of work to build the specifics of what you want to acheive. Below are a few of the basic functions that TestAdvantage and QuickTest Professional have that will assist you in doing what you want to do.
' To make this more ledgable I am going to assume the followingSet tree = SwfWindow("Form1").SwfTreeView("ultraTree1")
TestAdvantage Functions :
QuickTest Professional Functions :
You could use GetContent() to get all the currently visible nodes. You can then Split that list into an Array, loop through them, and Call ExpandAll on all the visible nodes, and you will have all possible nodes visible. Call GetContent() again, then you will get a list of all of the nodes.
If you want to handle the individual tier nodes in order, you can just either just expand the parent, or use something like:IF parentNode = Mid(currentNode, 0, Len(parentNode))to determine if the node you are currently testing is a child of the parent node. There are a number of approaches based on what you might want to do. But hopefully the functions supplied will help you with what you need to do.
I am not able to read the get the values from SwfTreeView (Infragistics.Win.UltraWinTree.UltraTree)
These are the values I am getting for the common methods.
The tree is in expanded mode
GetContent : \\\\\\
GetItemsCount : 4GetSelection : \\
GetItem : (Its rerurning blan for indexes from 0 to 4)
While recording also the recorded step is appearing as
Please let me know how I can get the contents and select a particular Item
My first thought is that your Text properties are blank, as the Node path is constructed by a leading "\" followed by a "\" delimited path. So that you would have a path like:
GetItem just gets the individual Node Text, not the entire path. So that if you are using GetItem on the example above you would get GrandChild1. What do you use to uniquely identify your Nodes in the UltraTree? Can you include a screen shot?
HI Mike I am attching the details with screen shot.
In the get content Its getting values for the variable part, but not the actual node text associated.
Pls look at the attchment for more details
Basically from what I can tell, you are not displaying the actual node text, you are displaying the first probably two columns with no border and no labels. The actual Text property for the Node is blank. Which is fine if you have the NodeTextColumn for the DisplayColumnSet set to your dominate unique column. The NodeTextColumn basically says, for each Node with a ColumnSet defined, use the value in cell that correseponds with that Column to set the Text property. In the first scenario your NodeTextColumn is either blank, or set to a column with No values in it, and your Text property is also blank. So your path to the Nodes are blank. In the second scenario you have a NodeTextColumn defined, but it's on a non-unique column, so you won't be able to record the way you would expect.
What I would suggest is using GetCellData which instead uses Index path's and Columns
cellVal = tree.GetCellData("\2\1\0", "Column1")
Thanks for the response.
If The test displayed is the colum text, is there any way in which we can select the node based on the column text?
- Is there any way to get the node ID/index/ key when the Column text is known?
I am able to get the displayed name.
With this I should be able to loop through the Nodes and check for the text. How can I select the node when The match is found?
Also Nodes gives only the parent nodes. How can we traverse to the child nodes?
What you can do if you have the indexes, and it is grid based. You can use ActivateCell, ActivateCell can use indexes as it's path so you can do :
Tree.ActivateCell "\0\1", "CellColumnName"
It has as a side effect fires the following events:
Can i know how u had done the attachments in this forum while you are posting a query , I'am unable to do it, I want to send an attachement to Mike for which the problem i'am facing.Please can u tell how the attachments can be send through this forum