Hi,
i encounter problems using the recorded code which contains an ShellDisposedCondition. On Playback time the result is:
com.windowtester.runtime.WaitTimedOutException: Timed out waiting for condition:
toString=ShellDisposedCondition: 'Lade Nachschlagedaten des Editors...'
class=com.windowtester.runtime.swt.condition.shell.ShellDisposedCondition
at com.windowtester.runtime.swt.internal.UIContextSWT.wait(UIContextSWT.java:823)
at com.windowtester.runtime.swt.internal.UIContextSWT.wait(UIContextSWT.java:795)
at com.windowtester.runtime.swt.internal.UIContextSWT.wait(UIContextSWT.java:788)
at de.kombiverkehr.kms.base.ui.BuchungTest.testBuchung(BuchungTest.java:34)
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:585)
at junit.framework.TestCase.runTest(TestCase.java:164)
at junit.framework.TestCase.runBare(TestCase.java:130)
at com.windowtester.runtime.common.UITestCaseCommon.access$0(UITestCaseCommon.java:1)
at com.windowtester.runtime.common.UITestCaseCommon$2.run(UITestCaseCommon.java:136)
at com.windowtester.runtime.common.UITestCaseCommon$3.run(UITestCaseCommon.java:157)
at com.windowtester.internal.runtime.junit.core.SequenceRunner$1.run(SequenceRunner.java:46)
Whats wrong?
The test code is:
public class BuchungTest extends UITestCaseSWT {
/* @see junit.framework.TestCase#setUp()
*/
protected void setUp() throws Exception {
super.setUp();
IUIContext ui = getUI();
ui.ensureThat(new WorkbenchLocator().hasFocus());
ui.ensureThat(ViewLocator.forName("Welcome").isClosed());
}
/**
* Main test method.
*/
public void testBuchung() throws Exception {
IUIContext ui = getUI();
ui.click(new MenuItemLocator("Buchung/Neue Buchung erfassen"));
ui.wait(new ShellDisposedCondition(
"Lade Nachschlagedaten des Editors..."));
ui.click(new LabeledTextLocator("Buchender Kunde:"));
ui.enterText("Paneur");
ui.wait(new ShellShowingCondition(""));
ui.click(2, new TableItemLocator(
"PANEUROPA (73600, Paneuropa - Rösch GmbH)"));
ui.click(new LabeledTextLocator("Quelle Buchungsdaten:"));
ui.wait(new ShellShowingCondition(""));
ui.click(2, new TableItemLocator("Fax"));
ui.click(new TableItemLocator("",
new SWTWidgetLocator(Table.class, new LabeledTextLocator("Buchungspositionen"))));
ui.enterText("PANEUR");
ui.wait(new ShellShowingCondition(""));
ui.click(2, new TableItemLocator(
"PANEUROPA (73600, Paneuropa - Rösch GmbH)"));
ui.ensureThat(new ShellLocator(
"KMS - Kombiverkehr Kapazitätsmanagementsystem [null]")
.isClosed());
ui.wait(new ShellDisposedCondition("Progress Information"));
ui.wait(new ShellShowingCondition("Save Resource"));
ui.click(new ButtonLocator("&No"));
ui.wait(new ShellDisposedCondition("Save Resource"));
ui.wait(new ShellDisposedCondition(
"KMS - Kombiverkehr Kapazitätsmanagementsystem [null]"));
}