Hello,
In HP's Unified Functional Testing, I am automating a test that interacts with an SwfTreeView Infragistics object, of type UltraWinTree. I am having great difficulty with getting UFT to run playback on this object. When I record an action on the UltraWinTree, the line "\\ObjectPath.ActivateNode "\ 1"" is recorded, no matter which node I select in the tree. Aside from this, I have been digging through the forums to identify how to select a particular node in the tree, and most of what I have found directs me to identify the correct node index, and then use this for UFT to point to the right node. This has not been possible thus far, because I am unable to identify the right path to a given node, other than with the information "\ 1", which will always point to the first node when I playback (despite UFT recording this for every node I select).
Once again I suspect that this is because in my assembly files for Test Automation for WinForms 2014.1, I do not possess the .dll for UltraWinTree. If the solution to this problem is indeed another installation package, then I would also need to be sure that it contains a .dll for UltraWinGrid, as I previously had issues with that Infragistics control (and the solution Infragistics support provided me with was a new installation package).
Thank you for any assistance,
Joseph
Hi Joseph,To investigate more on this case, I just wanted to know if you have the right version and build which is TA.QTP.Nightly_14.1.20141.2005. This is a re-release build of the version and not a patch. So this will have everything from the initial release and any added bug fixes until this release.
Thanks,Josheela
Josheela,
Thank you for attending to my issue. I looked into the files that I have for Infragistics, and it looks like I have version 14.1.20141.2005 for Test Automation. I saw this exact entry in the properties of the .exe for Version Utility. I should add that I saw no mention of "Nightly" though.
Thanks,Joseph
You have the correct build.
Since you are seeing the actions recorded the same on all nodes , I strongly doubt whether you have the SwfConfigfile configured right. You can go through this blog post to make sure if you have everything configured properly, http://es.infragistics.com/community/blogs/miketechspeak/archive/2016/06/07/about-the-swfconfig-file.aspx.
Also to assure your settings , you can open and run the sample scripts which gets installed under Public Documents.
Please let me know if you need anymore assistance on this case.
Josheela
Today I looked into the SwfConfig files for Infragistics, both for Version Free and CLR 4.0 and nothing looked out of order. Even under the specific entries for SwfTreeView everything looked okay by what I saw in the link you posted. I also ran the sample application in Public Documents and everything was recorded precisely (the node "levels" had specific names) with regard to node selection/interaction. I am not sure why it runs fine with this application and not my AUT.
Thank you for your continued attention to this issue.
Each volume release of Windows Forms Test Automation for HP (Unified Functional Testing) software maps directly to the corresponding release of Infragistics Windows Forms. Therefore, Windows Forms Test Automation for HP (Unified Functional Testing) software 2014 Volume 1 is supported to work only with Infragistics Windows Forms 2014 Volume 1.So, can you please make sure if your AUT is referencing the 2014.1 dlls.
Sure, I looked again in the BIN folder of my AUT. I believe that these .dlls are version 2014.1, but just to make absolutely sure I'll post a few of their names as examples here:
Infragistics4.Win.UltraWinTree.v14.1Infragistics4.Win.UltraWinGrid.v14.1Infragistics4.Win.UltraWinEditors.v14.1
Hmm, That's one method I hadn't thought of trying, and I am a bit leary of it. Setting the Key on a node to then use that new key to select that node. But actually trying it does work. I think the issue you are hitting is that you are prefacing the Select with a "\" the "\" tells IG TestAutomation that it is a path that it is looking for. Since you are passing in a key, you shouldn't use that.
So something like this should work:Set tree = SwfWindow("Root").SwfWindow("BaseTest_2").SwfTreeView("ultraTree1") tree.ActivateNode "\Value2" tree.Expand "\Value2" tree.SetNAProperty "Nodes[2].Nodes[2].Key", "MyKey" tree.Select "MyKey"
Let me know how that works for you,
This might call for a new forum post, but I thought that I might first raise this issue here. Now that I can verify information in a certain cell, I need to be able to select a certain node that is not necessarily the first entry in the table. I am able to set and get node keys, but when I try to select a node based on that key that I set, there is an error:
tree.SetNAProperty "Nodes[" & x & "].Key", "\ " & x 'used this format based on previously noted "\ 1"msgbox tree.GetNAProperty ("Nodes[" & x & "].Key") 'shows \ x appropriatelytree.Select "\ " & x 'lands me with "The following UltraTree Node [ x] was not found." in the error report
What can I do to properly select a node in this tree? Also I will add that when a get the key for a given cell, the column header is the returned value.
Mike,
Using this method I was able to obtain values throughout my WinTree object. Thank you very much for all of your feedback!
Thanks,Joe
Hi Joseph,
That would explain the issue as well. Yes the UltraWinTree has a Grid Style. The record functionality on that seems to be limited. But there is a GetCellData method that should work for verifying data the way you would like. It uses indexes only to dig through the Nodes\GridRows. So something like:tree.GetCellData("\0\0","name")
Should return from the first node's first row, from the column with the key name the value of the cell.
Similarly you can use GetNAProperty or a derivation of what I posted before: msgbox tree.GetNAProperty("Nodes[0].Nodes[0].Cells[2].Key")msgbox tree.GetNAProperty("Nodes[0].Nodes[0].Cells[2].Value")
Let me know if that helps,
Thank you for your suggestions. The first node in the tree that I can access does indeed have a single child that can be expanded, and also accessed with .Select " \1\101322". 101322 has no correlation with the content of the parent or child node from what I can tell. In general, the entire object looks very much like an UltraWinGrid, but I suppose that having just a few expandable rows in this set of data is why the WinTree control was used. Each column of this "table" is either composed of strings or integers, one column has either an "X" or a blank space which functions as a check box in a way, but without a way to be edited from the GUI (just giving you an idea of the tree's contents). Ultimately, I'd like to be able to access the data of a particular "cell" in a node of the tree.
As far as obtaining the keys, I implemented the snippet you suggested. It compiled and ran successfully, but unfortunately once again the message box reported only blank results so I am still lacking the node values.
Thank you once again for your continued support.