pcherng
13 years agoOccasional Contributor
Trouble with finding objects that are part of a JTree
In the tested application, there is a Swing JTree that is normally collapsed. I am able to make TestComplete click on the first node and expand it. When it is expanded, there is a JTextArea displayed for that node. I am trying to access the text that is displayed in that JTextArea. However, TestComplete refuses to recognize that the JTextArea even exists with the Find methods and even in the object browser. The object browser shows that the JTree does not have any JTextArea child objects, even after refreshing over and over. The only way I can get it to show that the JTextArea object exists in the object browser is to record a script of me highlighting some text in that JTextArea, right clicking the mapped name for the object in NameMapping, and selecting "Show in Object Browser," at which point the JTextArea child object magically appears. However, if I collapse and expand the JTree again, the JTextArea child object disappears and does not return and the mapped name no longer can find that object. Is there something I need to do to ensure that the child objects of a JTree can be found after expanding a node?