Hi,
In my application I have a Tree, with nodes as Users, Groups etc. When I right click on the Node it allows me to create a new item in that for eg. New User, New Group etc. The following is the piece of code that I use to create that new item. The same thing works perfectly for the User thing .. but hangs up at the helper.enterClickAndLeave statement for the user. I tried to debug the code & I found that it hangs somewhere in the resumeAWT() method of the source code. Any comments or solutions ???
public void testCreateGroup(){
ComponentFinder finder;
List listTextFields;
List listList;
List listHighlightButton;
JTextField[] textFields = new JTextField[5];
HighlightButton[] highlightButtons = new HighlightButton[10];
JList[] lists = new JList[5];
GroupDB group = new GroupDB();
finder = new ComponentFinder(JTree.class);
JTree m_Tree = (JTree)finder.find(0);
assertNotNull(m_Tree);
Hi,
In my application I have a Tree, with nodes as Users, Groups etc. When I right click on the Node it allows me to create a new item in that for eg. New User, New Group etc. The following is the piece of code that I use to create that new item. The same thing works perfectly for the User thing .. but hangs up at the helper.enterClickAndLeave statement for the user. I tried to debug the code & I found that it hangs somewhere in the resumeAWT() method of the source code. Any comments or solutions ???
public void testCreateGroup(){
ComponentFinder finder;
List listTextFields;
List listList;
List listHighlightButton;
JTextField[] textFields = new JTextField[5];
HighlightButton[] highlightButtons = new HighlightButton[10];
JList[] lists = new JList[5];
GroupDB group = new GroupDB();
finder = new ComponentFinder(JTree.class);
JTree m_Tree = (JTree)finder.find(0);
assertNotNull(m_Tree);
helper.enterClickAndLeave(new JTreeMouseEventData(this, m_Tree, "Groups", NUM_CLICKS,
RIGHT_CLICK_SELECT, POPUP_SELECTOR_TRUE, SLEEP_TIME));
JMenuItemFinder menuItemFinder;
menuItemFinder = new JMenuItemFinder("New Group*",true);
JMenuItem newGroupMenuItem = (JMenuItem)menuItemFinder.find();
assertNotNull(newGroupMenuItem);
System.out.println("Menu item found");
// It hangs while executing following statement.
helper.enterClickAndLeave( new MouseEventData(this, newGroupMenuItem));
System.out.println("Menu item clicked");
.......
Thanks very much.
Gaurav
Dont worry about this. I solved it :)
Thanks.
Gaurav