Skip to main content


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
Hello

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:

http://i752.photobucket.com/albums/xx163/caiob3/SWTBot_DebugRUN_001.jpg

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

CTRL + SHIFT + i

So, you got like this:

http://i752.photobucket.com/albums/xx163/caiob3/SWTBot_Debug_002.jpg


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

--
Caio Bulgarelli
MOTOROLA - BRAZIL

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: Thu Apr 25 17:26:40 GMT 2024

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

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

Back to the top