Problem with opening File Menu [message #32818] |
Mon, 20 April 2009 04:07  |
Eclipse User |
|
|
|
Hi,
I wrote a test for my plug-in.
When ever i execute my test then first it should change perspective to
that of "MyPlugin". Later it should create a new project using File menu..
There's no problem with the code to change perspective. But perspective
change takes some time to load the plug-in.
Meanwhile SWTBOT is executing the code for creating new project before
loading plug-in completely and the test is failed throwing following
exception.
I think SWTBot is unable to find the widget menu "File " before the
timeout period, as the plug-in takes much time to load than the timeout.
I tried the code with the "Debug" perspective instead of "MyPlugin"
perspective and works fine without any failure.
Please give me some pointers to resolve this issue.
org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundExcep tion: Could
not find widget.
at
org.eclipse.swtbot.swt.finder.SWTBotFactory.waitUntilWidgetA ppears(SWTBotFactory.java:365)
at
org.eclipse.swtbot.swt.finder.SWTBotFactory.menu(SWTBotFacto ry.java:274)
at
org.eclipse.swtbot.swt.finder.SWTBotFactory.menu(SWTBotFacto ry.java:227)
at
org.eclipse.swtbot.swt.finder.SWTBotFactory.menu(SWTBotFacto ry.java:218)
at
testsampledialog.MyPluginTest.testCreateNewProject(MyPluginT est.java:61)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at junit.framework.TestCase.runTest(TestCase.java:168)
at junit.framework.TestCase.runBare(TestCase.java:134)
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.OldTestClassRunner.run(OldTestCla ssRunner.java:76)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.r un(JUnit4TestReference.java:45)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(Test Execution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:460)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:673)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(R emoteTestRunner.java:386)
at
org.eclipse.swtbot.eclipse.core.RemotePluginTestRunner.main( RemotePluginTestRunner.java:64)
at
org.eclipse.swtbot.eclipse.core.UITestApplication.runTests(U ITestApplication.java:123)
at
org.eclipse.ui.internal.testing.WorkbenchTestable$1.run(Work benchTestable.java:68)
at java.lang.Thread.run(Unknown Source)
Caused by: org.eclipse.swtbot.swt.finder.widgets.TimeoutException: Timeout
after: 10000 ms.: Could not find a menu within the shell 'Shell with text
{Shell {MyPlugin - Eclipse SDK}}' matching 'with mnemonic 'File''
at
org.eclipse.swtbot.swt.finder.SWTBotFactory.waitUntil(SWTBot Factory.java:431)
at
org.eclipse.swtbot.swt.finder.SWTBotFactory.waitUntil(SWTBot Factory.java:405)
at
org.eclipse.swtbot.swt.finder.SWTBotFactory.waitUntil(SWTBot Factory.java:393)
at
org.eclipse.swtbot.swt.finder.SWTBotFactory.waitUntilWidgetA ppears(SWTBotFactory.java:363)
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02946 seconds