Open topic with navigation

com.hp.lft.sdk.web

## Interface TreeView

- All Superinterfaces:
    Clickable, LocationInfoProvider, SupportDragAndDrop, SupportsNativeObject, TestObject, TestObjectDescriber, VisibleProvider, WaitUntilVisibleProvider, WebElement, WebTestObject, WebTestObjectDescriber

      public interface TreeView
      extends WebElement

  A Web TreeView object

- - ### Method Summary

    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `buildNodePath(java.lang.Object... nodePathParts)` Returns the path of the specified node constructed from the path parts.
    `TreeViewConfiguration` | `getConfiguration()` Returns the set of xpath values that help in running Select, Expand, or Collapse operations on this tree node.
    `TreeViewNode` | `getNode(java.lang.Object... nodePathParts)` Returns the specified node in the tree using the path created with the parts of the path.
    `TreeViewNode` | `getNode(java.lang.String nodePath)` Returns the specified node in the tree using the full path to the tree item.
    `java.lang.String` | `getSelectedNodePath()` Returns the path of the selected node in this tree.
    `void` | `select(java.lang.String nodePath)` Selects the specified node in the tree based on the path to the node. If the child items in this object are generated dynamically (for example, they are not visible or present in the application until the parent node is expanded), LeanFT not be able to select the items in the tree automatically using the this method.
    `void` | `select(TreeViewNode node)` Selects the supplied node in the tree.
    `void` | `setConfiguration(TreeViewConfiguration configuration)` Sets the set of xpath values that help in running select, expand, or collapse operations on this tree node.

    - ### Methods inherited from interface com.hp.lft.sdk.web.WebElement

      `doubleClick, doubleClick, fireEvent, getAccessibilityName, getCSSSelector, getRole, getXPath, hoverTap, hoverTap, longPress, longPress, pan, pan, pinch, pinch, swipe, swipe`

    - ### Methods inherited from interface com.hp.lft.sdk.TestObject

      `exists, exists, findChildren, getDescription, getDisplayName, getParent, getSnapshot, getTextLocations, getTextLocations, getVisibleText, getVisibleText, highlight, highlightMatches, setDescription, setDisplayName, verifyImageExists, verifyImageExists, verifyImageMatch, verifyImageMatch, verifyImageMatch, verifyImageMatch, verifyImageMatch, verifyImageMatch, waitUntilExists, waitUntilExists`

    - ### Methods inherited from interface com.hp.lft.sdk.Clickable

      `click, click, click`

    - ### Methods inherited from interface com.hp.lft.sdk.web.WebTestObject

      `getAttribute, getAttributes, getClassName, getComputedStyle, getComputedStyles, getId, getInnerHTML, getInnerText, getName, getOuterHTML, getOuterText, getTagName, getTitle, isVisible`

    - ### Methods inherited from interface com.hp.lft.sdk.LocationInfoProvider

      `getAbsoluteLocation, getLocation, getSize`

    - ### Methods inherited from interface com.hp.lft.sdk.web.WebTestObjectDescriber

      `describe, describe`

    - ### Methods inherited from interface com.hp.lft.sdk.TestObjectDescriber

      `describe`

    - ### Methods inherited from interface com.hp.lft.sdk.SupportsNativeObject

      `getNativeObject`

    - ### Methods inherited from interface com.hp.lft.sdk.SupportDragAndDrop

      `dragAndDropOn, dragAndDropOn`

    - ### Methods inherited from interface com.hp.lft.sdk.WaitUntilVisibleProvider

      `waitUntilVisible, waitUntilVisible`

    - ### Methods inherited from interface com.hp.lft.sdk.VisibleProvider

      `isVisible`

- - ### Method Detail

    - #### getSelectedNodePath

          java.lang.String getSelectedNodePath()
                                        throws GeneralLeanFtException

      Returns the path of the selected node in this tree. If there is more than one selected node, the first node is returned.
      Your application must implement the "aria-selected" property for this object to enable LeanFT to display the selected node path.
      Returns:
        the path of the selected node in this tree. If there is more than one selected node, the first node is returned.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### setConfiguration

          void setConfiguration(TreeViewConfiguration configuration)

      Sets the set of xpath values that help in running select, expand, or collapse operations on this tree node.
      If null or never set the TreeView will use the default implementation of these operations.
      Parameters:
        `configuration` - that contains a set of xpath values that help in running Select, Expand, or Collapse operations on nodes of this tree.

    - #### getConfiguration

                                                      TreeViewConfiguration getConfiguration()

      Returns the set of xpath values that help in running Select, Expand, or Collapse operations on this tree node.
      If this value is null, the TreeView object uses the default implementation of these operations.
      Returns:
        the set of xpath values that help in running Select, Expand, or Collapse operations on this tree node.

    - #### getNode

                                                      TreeViewNode getNode(java.lang.String nodePath)
                        throws GeneralLeanFtException

      Returns the specified node in the tree using the full path to the tree item.
      Parameters:
        `nodePath` - the full path of the node to return within the tree, separated by semicolons.
      Returns:
        the specified node.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### getNode

                                                      TreeViewNode getNode(java.lang.Object... nodePathParts)
                        throws GeneralLeanFtException

      Returns the specified node in the tree using the path created with the parts of the path.
      Parameters:
        `nodePathParts` - the tree path parts. This can include the logical name(string), full path(comma-separated strings), or index (0-based).
      Returns:
        the specified node.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### buildNodePath

          java.lang.String buildNodePath(java.lang.Object... nodePathParts)

      Returns the path of the specified node constructed from the path parts.
      Parameters:
        `nodePathParts` - The path parts to the tree element. This can include the logical name(string), full path(comma-separated strings), or index (0-based).
      Returns:
        the menu path

    - #### select

          void select(TreeViewNode node)
               throws GeneralLeanFtException

      Selects the supplied node in the tree.
      Parameters:
        `node` - the TreeViewNode object to select in the tree
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### select

          void select(java.lang.String nodePath)
               throws GeneralLeanFtException

      Selects the specified node in the tree based on the path to the node.
      If the child items in this object are generated dynamically (for example, they are not visible or present in the application until the parent node is expanded), LeanFT not be able to select the items in the tree automatically using the this method. Manually add steps to make the nodes visible or expand tree nodes to create the object in the application.
      Parameters:
        `nodePath` - the full path to the tree node to select, separated by semicolons
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.