Version

xamNetworkNode - Recordable Methods

Topic Overview

Purpose

This topic provides information about the xamNetworkNode™ control’s testable user recordable methods.

xamNetworkNode Test Object Recordable Methods Summary

Recordable methods summary chart

The following table briefly explains the various recordable methods for testing the control. Detailed information about the methods follows the table.

Method Description

This method stores the activated node’s identifier.

This method listens for the node’s collection change event when clearing the entire selection of the xamNetworkNode control.

This method listens for the event that fires when a xamNetworkNode control’s node collapses.

This method listens for the event that fires when a xamNetworkNode control’s node expands.

This method stores the identifiers of all the selected nodes as of when the collection changes.

This proxy method pans to specific coordinates of the xamNetworkNode control’s layout area.

This proxy method zooms to specific coordinates of the xamNetworkNode control’s layout area.

ActivateNode method

Description

This method activates a single xamNetworkNode control node obtained from its oNodeIdentifier.

Parameters

The following table explains the method’s parameter followed by code example.

Method parameter Description

oNodeIdentifier

Uniquely identifies the xamNetworkNode control’s node using either the node’s label or visible index.

Example

Activating the node labeled “Node45.”

XamNetworkNode("xamNetworkNode1").ActivateNode "Node45"

Activating the node using an index (zero-based).

XamNetworkNode("xamNetworkNode1").SelectNodes 10

Default settings

Initially there is no active node.

Possible exceptions

The following table lists the possible exceptions to the method and the likely reason causing them.

Exception reasons

The node(s) visibility is hidden or collapsed.

Index of the node(s) is out of range.

Cannot find the node Label(s) among the existing nodes collection.

ClearSelection method

Description

This method clears the xamNetworkNode control’s entire selection of nodes.

Parameters

None

Example

The following script is from the recording where the xamNetworkNode is set with selection mode as “ Extended .” While in extended mode, selecting a node and then clicking on the same node again clears the entire selection.

XamNetworkNode("xamNetworkNode1").ClearSelection

Default settings

Clears all nodes from any selection.

Possible exceptions

N/A

CollapseNode method

Description

The method described here collapses a single xamNetworkNode control node, obtained from its oNodeIdentifier.

Note
Note:

By default, expansion indicators are disabled, so your application needs to enable them before testing. Achieve this by setting the ExpansionIndicatorVisibility property to True .

Parameters

The following table explains the method’s parameter followed by code example.

Method parameter Description

oNodeIdentifier

This uniquely identifies the xamNetworkNode control’s node, which can be either the node’s label or visible index.

Example

Collapsing the node with label “Node3.”

XamNetworkNode("xamNetworkNode1").CollapseNode "Node3"

Collapsing the node using an index 2.

XamNetworkNode("xamNetworkNode1").CollapseNode 2

Default settings

Initially, all nodes are expanded with the expansion indicators not visible (disabled).

Possible exceptions

The following table lists the possible exceptions to the method and the likely reason causing them.

Exception reasons

A node on which the expansion indicator is invisible cannot be collapsed.

The node(s) visibility is hidden or collapsed.

Index of the node(s) is out of range.

The node Label(s) is not found among the existing nodes collection.

ExpandNode method

Description

This method expands a single node, of the xamNetworkNode control, obtained from its oNodeIdentifier.

Note
Note:

Disabled by default, expansion indicators, require your application to enable them before testing setting the ExpansionIndicatorVisibility property to True .

Parameters

The following table explains the method’s parameter followed by code example.

Method parameter Description

oNodeIdentifier

This uniquely identifies the xamNetworkNode control’s node, which can be either the node’s label or visible index.

Example

Expanding the node with label “Node3.”

XamNetworkNode("xamNetworkNode1").ExpandNode "Node3"

Expanding the node using an index (zero-based).

XamNetworkNode("xamNetworkNode1").ExpandNode 2

Default settings

By design, all nodes are initially expanded with their expansion indicators not visible (disabled).

Possible exceptions

The following table lists the possible exceptions to the method and the likely reason causing them.

Exception reasons

A node on which the expansion indicator is invisible cannot be expanded.

The node(s) visibility is hidden or collapsed.

Index of the node(s) is out of range.

The node Label(s) is not found among the existing nodes collection.

SelectNodes method

Description

This method selects a single node or an array of nodes obtained from the xamNetworkNode control’s oNodeIdentifiers argument.

Parameters

The following table explains the method’s parameter followed by code example.

Method parameter Description

oNodeIdentifiers

Uniquely identifies the x amNetworkNode control’s nodes.

  • If this identifier represents a single node, it can be either the node’s label or the visible index

  • If this identifier represents multiple nodes, it will be an array of each node’s label or visible index.

Example

Selecting multiple nodes with labels identified as, “Node44” and “Node45.”

XamNetworkNode("xamNetworkNode1").SelectNodes ARRAY("Node44", "Node45")

Selecting multiple nodes using the nodes’ indices (zero-based).

XamNetworkNode("xamNetworkNode1").SelectNodes ARRAY(15, 16)

Selecting a single node with label identified as, “Node44.”

XamNetworkNode("xamNetworkNode1").SelectNodes "Node44"

Selecting a single node using the node’s index (zero-based).

XamNetworkNode("xamNetworkNode1").SelectNodes 15

Default settings

All nodes are unselected.

Possible exceptions

The following table lists the possible exceptions to the method and the likely reason causing them.

Exception reasons

The selection type of the xamNetworkNode control is set to “None” meaning that nodes cannot be selected.

The selection type of the xamN etworkNode control is “Single” and more than one nodes is specified in the oNodeIdentifiers.

The node(s) visibility is hidden or collapsed.

Index of the node(s) is out of range.

The node Label(s) is not found among the existing nodes collection.

PanArea method

Description

This method identifies the pan area on the xamNetworkNode control’s layout using two coordinates (dAreaLeft and dAreaTop).

Parameters

The following table explains the method’s parameters followed by code example.

Method parameter Description

dAreaLeft

Left coordinate of the new area, a calculated value from the layout’s left border.

dAreaTop

Top coordinate of the new area, a calculated value from the layout’s top border.

Example

Indicates the control’s position on the xamNetworkNode layout using the pan area coordinates.

XamNetworkNode("xamNetworkNode1").PanArea 2.7057, 2.8726

Default settings

N/A

Possible exceptions

Refer to Panning and Zooming topic.

ZoomArea method

Description

This method Identifies the zoom area on the xamNetworkNode control’s layout using the four coordinates (dAreaLeft, dAreaTop, dAreaRight and dAreaBottom).

Parameters

The following table explains the method’s parameters followed by code example.

Method parameter Description

dAreaLeft

Left coordinate of the new area, a calculated value from the layout’s left border.

dAreaTop

Top coordinate of the new area, a calculated value from the layout’s top border.

dAreaRight

Right coordinate of the new area, a calculated value from the layout’s right border.

dAreaBottom

Bottom coordinates of the new area, a calculated value from the layout’s bottom border.

Example

Displays the control on the xamNetworkNode layout, zoomed in or out, based on the specified coordinates.

XamNetworkNode("xamNetworkNode1").ZoomArea -7.4562, 0, 651.9637, 497.7631

Default settings

N/A

Possible exceptions

Refer to the Panning and Zooming topic for additional information.

Related Content

Topics

The following topics provide additional information related to this topic.

Topic Purpose

This topic provides information about the xamNetworkNode control’s testable user actions and elements.

This topic provides information about the xamNetworkNode control’s testable user replay-only methods.

This topic provides reference information about the xamNetworkNode control’s test object properties.

This topic provides reference information about the common enumerations used in testing the xamNetworkNode control.