Skip to content

Replies

0
Michael Germann
Michael Germann answered on Dec 10, 2008 4:20 PM

Hi Srikanth,

    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 following
Set tree = SwfWindow("Form1").SwfTreeView("ultraTree1")

TestAdvantage Functions :

  • tree.GetContent() – returns a chr(10) delimited string list of all the currently visible nodes, and their children if they are expanded
  • tree.Expand(strNode) – expands just the supplied.
  • tree.ExpandAll(strNode) – expands the supplied node and all the nodes under the supplied node.

QuickTest Professional Functions :

  • Split(string, delimiter) – returns an Array of strings split by the delimiter
  • UBound(array) – returns an integer value of the UpperBound of an array
  • Len(string) – returns an integer value of the number of characters in the string
  • Mid(string, start, length) – returns a string value substring of the supplied string starting from the start position of a length of characters supplied.

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.

0
Michael Germann
Michael Germann answered on Jul 29, 2008 3:07 PM

   Again I would highly suggest you take this to Developer support, replay back to the email they sent, there you can attach your image and work it out in more detail with them. As to GetSelection, it will return a value for every Checked StateButtonTool in the toolbar. It would also have thrown an error if you supplied a path to a non-existant toolbar. The fact that it is not throwing an error means that you did supply a correct path to a valid toolbar, and that toolbar has no checked StateButtons in it. Now perhaps you actually do not have statebuttons, or they are not actually checked. I would try clicking on them and checking the value again. If the value doesn't change perhaps they are disabled, or they are not really state buttons, either way, at this point contact developer support.

0
Michael Germann
Michael Germann answered on Jul 17, 2008 4:37 PM

 At this point I would suggest you contact our developer support as they would be able to give a bit more of a hands on approach to assisting you with this matter.

0
Michael Germann
Michael Germann answered on Jul 17, 2008 2:57 PM

 Hi Robert,

     Looking back to your original post, you are using Windows components in a web environment, which is an unsupported environment. While it may work it is not gauranteed, I believe it not recording may be related to that. As to the property not found, if the tool is in fact a state button, Checked is a valid public property. It should be stated that GetItemProperty is case sensitive, so you must use it as Checked not checked. Let me know if that helps you.

 

0
Michael Germann
Michael Germann answered on Jul 16, 2008 3:32 PM

    EnabledResolved determines if the tool is enabled, not if it is checked. If you are able to click on, and interact with a tool than it is highly likely that it is not disabled and therefore EnabledResolved will return true, that is expected. Also the ToolPath and ToolKey I gave you previously was specific to a sample app on my machine, using it as a whole or in part will not work with your application because you would not have tools with that key or path. 

     What it sounds like is that you have a StateButtonTool, that you are trying to determine what state the button is in. In which case you can use the GetItemProperty method as I stated before, but instead use the property specific to StateButtonTools called Checked instead of EnabledResolved. As to the PathToTool and ToolKe, I would suggest recording a Click on the tool, this will give you the correct Path and Key for that tool.

 

0
Michael Germann
Michael Germann answered on Jul 15, 2008 9:13 PM

Hi Rob,

To retrieve a property of a tool on the UltraToolBarsManager use the GetItemProperty method. This allows you to retrieve any public property off of the Tool object.  In the case of how to determine if the Tool is Enabled you can use the EnabledResolved property as shown below.

Set oTBManager = SwfWindow(“Root”).SwfToolbar(“_Root_Toolbars_Dock_Area_Top”)
strPathToTool = “RootMenu,V81,V81_WinListView”
strToolKey = “V81_WinListView_Size2Fit”
strPropertyName = “EnabledResolved”

oTBManager.GetItemProperty strPathToTool, strToolKey, strPropertyName