Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » Not able to access Context Menu for tree
Not able to access Context Menu for tree [message #537491] Wed, 02 June 2010 15:37
Rahman  is currently offline Rahman Friend
Messages: 8
Registered: December 2009
Junior Member
I am facing issue in selecting/clicking a menu item in the context menu for a tree. I Searched in google and found some code and tried. It is returning 50 values int he search.
But when I tried to see what menu item is that iam getting two errors 1. Disposed and 2. Wrong Thread.

some one help me to find the context menu items for a tree and how to know what items are there.

final org.hamcrest.Matcher<MenuItem> matcher = allOf(widgetOfType(MenuItem.class));
final ContextMenuFinder menuFinder = new ContextMenuFinder((Control) ddTree.widget );
bot.waitUntil(new DefaultCondition() {
public String getFailureMessage() {
return "Could not find context menu items";

public boolean test() throws Exception {
return !menuFinder.findMenus(matcher).isEmpty();

java.util.List<MenuItem> list = menuFinder.findMenus(matcher);
for(int i=0;i<list.size();i++){
}catch(Exception e){

Thanks for your help in advance.

Previous Topic:Update problems
Next Topic:Accessing wizard error/warning messages?
Goto Forum:

Current Time: Sun Nov 28 03:47:17 GMT 2021

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

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

Back to the top