Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » Using SWTBot for Jface tableViewer
Using SWTBot for Jface tableViewer [message #1705143] Wed, 12 August 2015 12:35
Apurva Mundhada is currently offline Apurva MundhadaFriend
Messages: 1
Registered: August 2015
Junior Member
How to read context menu item on Jface tableviewer in SWTBot.
I tried

bot.table().getTableItem(0).select();
bot.table().getTableItem(0).contextMenu("COPY").click();

After the above code execution my first table item is getting selected but for context menu it is giving below error..

org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException: The widget {(of type 'MenuItem' and with mnemonic 'Copy')} was disposed.
at org.eclipse.swtbot.swt.finder.widgets.AbstractSWTBot.<init>(AbstractSWTBot.java:113)
at org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu.<init>(SWTBotMenu.java:44)
at org.eclipse.swtbot.swt.finder.widgets.AbstractSWTBot.contextMenu(AbstractSWTBot.java:451)
at org.eclipse.swtbot.swt.finder.widgets.AbstractSWTBot.contextMenu(AbstractSWTBot.java:423)
at com.swtbot.test.MyFirstTest.myTest1(MyFirstTest.java:59)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner.run(SWTBotJunit4ClassRunner.java:54)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.swtbot.eclipse.core.RemotePluginTestRunner.main(RemotePluginTestRunner.java:64)
at org.eclipse.swtbot.eclipse.core.UITestApplication.runTests(UITestApplication.java:117)
at org.eclipse.ui.internal.testing.WorkbenchTestable$1.run(WorkbenchTestable.java:71)
at java.lang.Thread.run(Thread.java:619)

Thanks for the help..
Previous Topic:TreeView to GEF editor drag n drop
Next Topic:SWTBot executed in parallel?
Goto Forum:
  


Current Time: Thu Sep 20 21:03:54 GMT 2018

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

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

Back to the top