GEF editor returns "The graphical viewer is null" [message #783132] |
Wed, 25 January 2012 05:56 |
Ramesh D Messages: 17 Registered: January 2012 |
Junior Member |
|
|
Hi,
I am a QA engineer with experience on other UI based functional testing tool. Just now found SWTBot to be very useful in creating my tests for my application which is eclipse based. I was able to identify most of the widgets but i am unable to identify the GEF editor i get an error message saying "The graphical viewer is null".
when i try to eclipse spy on my object i get the following info on the editor.
//Shell/-1//Composite/4//Composite/0//Composite/10//Composite/2//Composite/0//InfaCTabFolder/0//Composite/0//Canvas/0
which seems to be a canvas.
i get the error when i am executing the below statement on the editor which has the name as "demo".
bot.gefEditor("demo").close();
Can any please help me with this?
below is the stack trace. also attached the snapshot of the editor.
org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException: The graphical viewer is null.
at org.eclipse.swtbot.eclipse.gef.finder.widgets.SWTBotGefViewer.<init>(SWTBotGefViewer.java:79)
at org.eclipse.swtbot.eclipse.gef.finder.widgets.SWTBotGefEditor.<init>(SWTBotGefEditor.java:65)
at org.eclipse.swtbot.eclipse.gef.finder.SWTGefBot.createEditor(SWTGefBot.java:70)
at org.eclipse.swtbot.eclipse.gef.finder.SWTGefBot.gefEditor(SWTGefBot.java:60)
at org.eclipse.swtbot.eclipse.gef.finder.SWTGefBot.gefEditor(SWTGefBot.java:42)
at Myfirst.testcloseWelcomeWizard(Myfirst.java:142)
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 junit.framework.TestCase.runTest(TestCase.java:168)
at junit.framework.TestCase.runBare(TestCase.java:134)
at org.eclipse.swtbot.swt.finder.SWTBotTestCase.runBare(SWTBotTestCase.java:228)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:79)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
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:662)
[Updated on: Wed, 25 January 2012 05:58] Report message to a moderator
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 5.03410 seconds