Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » Select Item in Treeviewer with SWTBot
Select Item in Treeviewer with SWTBot [message #544768] Mon, 05 July 2010 13:16 Go to next message
Bernd van Velsen is currently offline Bernd van VelsenFriend
Messages: 19
Registered: November 2009
Junior Member

I am trying to select(highlight, like i clicked the item with the mouse) a TreeViewerItem in an Eclipse RCP application. I do this with the following code:

bot.viewById("ProjectsView").bot().tree().getTreeItem("Parent ").select();

this does not work. What am I doing wrong?

thanks for the help

Re: Select Item in Treeviewer with SWTBot [message #545040 is a reply to message #544768] Tue, 06 July 2010 13:53 Go to previous message
Caio Bulgarelli is currently offline Caio BulgarelliFriend
Messages: 16
Registered: February 2010
Junior Member
Hi Bernd,

I noticed that there are a SPACE in the String "Parent "

Is really exist this little space?

However, here is a good tip for you:

You can put a breakpoint in your code and Run in Debug mode:

And once stopped at your breakpoint line, you can highlighting all expression and select in you keyboard


So, you got like this:

This is a very usefull tip!
You can see where and why you are doing wrong.

Caio Bulgarelli

Previous Topic:How to test my application using SWT?
Next Topic:NoClassDefFoundError: org.eclipse.swt.SWTError in running headless SWTBot test with Ant
Goto Forum:

Current Time: Fri Nov 27 06:28:50 GMT 2015

Powered by FUDForum. Page generated in 0.07599 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software