Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » Getting Widget is Disposed Error in Tree
Getting Widget is Disposed Error in Tree [message #1079896] Mon, 05 August 2013 03:58 Go to next message
pawan garia is currently offline pawan garia
Messages: 24
Registered: February 2013
Junior Member
Hi All

I have a Tree which is in a Table Format and i want to expand the Tree. Problem is Tree nodes dont have a name, its just Signs.
Please Find the Snapshot for more understanding
The code i am trying is Simple :
	SWTBotTreeItem[] items = bot.tree().getAllItems();
		System.out.println("Size of the Tree : "+items.length);
		for (SWTBotTreeItem item : items) {
			item.select();
			System.out.println("First Row WF Name "+item.select().cell(3).toString());
			SWTBotTreeItem[] item1 = item.getItems();	
			System.out.println("Size of the second Tree : "+item1.length);
			Thread.sleep(2000);
			for (SWTBotTreeItem item2 : item1) {
				Thread.sleep(2000);
				item2.select().expand();
				Thread.sleep(2000);
				System.out.println("Second Row WF Name "+item2.select().cell(3).toString());
			    	SWTBotTreeItem[] item3 = item2.getItems();	
				      for (SWTBotTreeItem item4 : item3) {
				    	  Thread.sleep(2000);
				    	  item4.select().expand();
				    	  System.out.println("Third Row WF Name "+item4.select().cell(3).toString());
				      }
		}
		}
	}

Every Time i try to click it is throwing
org.eclipse.swt.SWTException: Failed to execute runnable (org.eclipse.swt.SWTException: Widget is disposed)
at org.eclipse.swt.SWT.error(SWT.java:3884)
at org.eclipse.swt.SWT.error(SWT.java:3799)
  • Attachment: TreeView.png
    (Size: 14.74KB, Downloaded 59 times)
Re: Getting Widget is Disposed Error in Tree [message #1090061 is a reply to message #1079896] Mon, 19 August 2013 12:58 Go to previous message
Mickael Istria is currently offline Mickael Istria
Messages: 744
Registered: July 2009
Location: Grenoble, France
Senior Member
On 08/05/2013 09:58 AM, pawan garia wrote:
> org.eclipse.swt.SWTException: Failed to execute runnable (org.eclipse.swt.SWTException: Widget is disposed)
> at org.eclipse.swt.SWT.error(SWT.java:3884)
> at org.eclipse.swt.SWT.error(SWT.java:3799)

This stacktrace is not enough to help you. Which line in your code
causes this exception?
--
Mickael Istria
JBoss, by Red Hat
My blog: http://mickaelistria.wordpress.com
My Tweets: http://twitter.com/mickaelistria
Previous Topic:Setting the Locale for SWTBot headless tests
Next Topic:How to click on different Editor parts in Editor.
Goto Forum:
  


Current Time: Wed Aug 27 15:11:56 EDT 2014

Powered by FUDForum. Page generated in 0.01555 seconds