I am trying to use SWTBot to test an Eclipse plugin that uses a tree
view much like the one in the "New Project" dialog box, but I am having
problems with the SWTBotTreeItem.expand() functionality.

I am using the following code:


        private void testCreateProject() throws Exception {
                final SWTBotMenu fileMenu = bot.menu("File");
                final SWTBotMenu newFileMenu = fileMenu.menu("New");
                final SWTBotMenu newProjectMenu = 
newFileMenu.menu("Project...");

                newProjectMenu.click();

                final SWTBotTree tree = bot.tree();
                final SWTBotTreeItem generalNode = tree.getTreeItem("General");

                generalNode.expand();
                generalNode.select("Project"); // BOOM!
        }


The code fails when trying to select the node labeled "Project" because
the line generalNode.expand() does not seem to actually expand the
node. 

Any hint on how to overcome this problem would be greatly appreciated.

Best regards,

Joachim


Joachim F. Kainz
http://jolira.com


<<attachment: jolira.png>>

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
SWTBot-users mailing list
SWTBot-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/swtbot-users
http://swtbot.org/ - a functional testing tool for SWT/Eclipse

Reply via email to