Hi,
I recorded a test for a RCP Application, which went well. It looks like this:
....
public void testout() throws Exception {
IUIContext ui = getUI();
ui.click(new TableItemLocator("0004490", new ViewLocator(
"com.saf.cockpit.viewers.OrderTableView")));
ui
.click(new XYLocator(new CTabItemLocator("Exception Details"),
86, 12));
ui.click(new TableItemLocator("0004482", new ViewLocator(
"com.saf.cockpit.viewers.OrderTableView")));
ui.click(new TableItemLocator("0004497", new ViewLocator(
"com.saf.cockpit.viewers.OrderTableView")));
}
....
The problem is, when I run this test again as Junit-Plugin Test as stated in your tutorials, my RCP Application starts just fine, but instead of executing
the test, I get the error:
com.windowtester.runtime.swt.finder.UnableToFindActiveShellException
at com.windowtester.finder.swt.WidgetFinderService.collectMatches(WidgetFinderService.java:74)
at com.windowtester.finder.swt.SWTWidgetFinder.findAll(SWTWidgetFinder.java:67)
at com.windowtester.runtime.WidgetLocator.findAll(WidgetLocator.java:417)
at com.windowtester.runtime.swt.internal.UIContextSWT.findAll(UIContextSWT.java:493)
at com.windowtester.runtime.swt.internal.UIContextSWT.find(UIContextSWT.java:428)
at com.windowtester.runtime.swt.internal.UIContextSWT.find(UIContextSWT.java:440)
at com.windowtester.runtime.swt.internal.UIContextSWT.find(UIContextSWT.java:440)
at com.windowtester.runtime.swt.internal.UIContextSWT.find(UIContextSWT.java:440)
at com.windowtester.runtime.swt.internal.UIContextSWT.find(UIContextSWT.java:440)
at com.windowtester.internal.runtime.selector.ClickHelper.doFind(ClickHelper.java:192)
at com.windowtester.internal.runtime.selector.ClickHelper.click(ClickHelper.java:58)
at com.windowtester.internal.runtime.UIContextCommon.click(UIContextCommon.java:75)
at com.windowtester.runtime.swt.internal.UIContextSWT.click(UIContextSWT.java:277)
at com.windowtester.internal.runtime.UIContextCommon.click(UIContextCommon.java:68)
at com.windowtester.runtime.swt.internal.UIContextSWT.click(UIContextSWT.java:285)
at com.windowtester.internal.runtime.UIContextCommon.click(UIContextCommon.java:61)
at com.windowtester.runtime.swt.internal.UIContextSWT.click(UIContextSWT.java:268)
at com.saf.cockpit.test.out.testout(out.java:17)
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:164)
at junit.framework.TestCase.runBare(TestCase.java:130)
at junit.extensions.UITestCaseCommon.access$101(UITestCaseCommon.java:26)
at junit.extensions.UITestCaseCommon$1.run(UITestCaseCommon.java:140)
at junit.extensions.core.SequenceRunner$1.run(SequenceRunner.java:44)
Google does not give any information on this exception except one of your pages, but the information is not very helpful. Could you explain to me in more detail, what that exception could mean, what I could have done wrong?
Thanks in advance.