question

JeffJ avatar image
JeffJ asked JeffJ posted

ExpandNode functionality in JavaSwing

I have a customer with a Java App that utilizes a tree to navigate to the appropriate screen.  We're trying to use ExpandNode but are running into difficulties.  We're attempting to use the Node_ID but that doesn't seem to work.

 

Any ideas?

iTestGUI Testing(Web-Java Swing-etc)
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
PreetS avatar image
PreetS answered PreetS posted

Depending on the type of tree you might want to use expandNode, or clickNode, or doubleClickNode to expand the node.

You pass in the path to the node, not the Node_id

 

e.g. if a tree with a root node Music, and childnodes, Jazz, Rock, Classical

and if you wish to expand node Rock, your command would be "Music/Rock"

You could also expand nodes by the index of the node; in that case your command would be "0/1" (the index of the node)

3 comments
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

JeffJ avatar image JeffJ ♦ commented ·

In the tree I have, the nodes look like this:

 

Network Objects

- Network Inventory

  - Networks

  - Nodes

  - Cards

  - Ports

 

When I use Network Objects/Network Inventory/Cards in the expandNode, nothing happens.  If I use 0/0/2, I get an error from the customer's application for "Exception performing action".

 

I've also tried to put double quotes around the nodes but that doesn't seem to work either.

 

Thoughts?

0 Likes 0 ·
JeffJ avatar image JeffJ ♦ JeffJ ♦ commented ·
Another point of information.  When I manually expand the tree and select "getTree", I'm not seeing the "getTree" command in the capture window.  Should it be?
0 Likes 0 ·
JeffJ avatar image JeffJ ♦ JeffJ ♦ commented ·
Yet another point of information.  It appears that the tree may be dynamically built.  I can expand the tree but the getTree doesn't provide any response.
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.