Skip to main content



      Home
Home » Eclipse Projects » SWTBot » Select Item in Treeviewer with SWTBot
Select Item in Treeviewer with SWTBot [message #544768] Mon, 05 July 2010 09:16 Go to next message
Eclipse UserFriend
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 09:53 Go to previous message
Eclipse UserFriend
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: Tue Jul 22 20:09:10 EDT 2025

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

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

Back to the top