Information in this topic applies only to web tests that implement the default approach. This method is not supported in cross-platform web tests. |
Description
The ExpandItem
action expands the tree view item specified by the Item parameter. The result is the same as if you would click the “+” of a collapsed tree view node. Note that the ExpandItem
action does not move the cursor.
Declaration
TestObj.ExpandItem(Item)
TestObj | A variable, parameter or expression that specifies a reference to one of the objects listed in the Applies To section | |||
Item | [in] | Required | Variant | |
Result | None |
Applies To
The method is applied to the following objects:
Flex Tree, Infragistics UltraTree, Java Swing Tree and 10 more objects, Oracle Forms Tree, Qt TreeWidget, Silverlight Tree View, Syncfusion TreeViewAdv, Telerik RadTreeView for ASP.NET AJAX, Telerik RadTreeView for Silverlight, Telerik RadTreeView for WinForms, Win32 TreeView, WPF TreeView, YUI 2 TreeView « Collapse the list
View Mode
This method is available in the Object Browser panel and in other panels and dialogs in both Basic and Advanced view modes.
Parameters
The method has the following parameter:
Item
Specifies the path to the desired item. The path should be relative to the current item or to the tree root, respectively. To indicate that the path starts from the tree root, place the pipeline character ( | ) at the beginning of the path.
Each item in the path can be specified by its caption or index; individual captions and indexes must be separated with pipeline characters ( | ). Indexes must be enclosed in brackets - [ and ].
To indicate variable parts of the item caption, you can use the asterisk (*) and question mark (?) wildcards. The asterisk corresponds to a string of any length, the question mark corresponds to any single character. The caption can be case-sensitive or case-insensitive depending on the value of the Use case-sensitive parameters project setting.
Note: | If the item caption includes a bracket or a pipeline character, address the item by its index or with the question mark wildcard. |
Result Value
None.
Remarks
If the specified item is not found, ExpandItem
fails and posts an error message to the test log.
The script recorder recognizes clicks on the “+” buttons within the tree view control and records the ExpandItem
command.
Example
To view an example that demonstrates how to use the ExpandItem
action, see Expanding and Collapsing Tree View Items.
See Also
ExpandItem Action (Specific to XULTree Controls)
CollapseItem Action (TreeView Controls)
wExpanded Property (Specific to Win32TreeView Controls)
wSelection Property (Specific to Win32TreeView Controls)
Expand Action (TreeViewItem Objects)