- Code: Select all
ui.wait(new ShellShowingCondition("Progress Information"));
// or
ui.assertThat(new ShellShowingCondition("Progress Information"));
Moderators: gnebling, Eric Clayberg, Dan Rubel, keertip, Phil Quitslund
ui.wait(new ShellShowingCondition("Progress Information"));
// or
ui.assertThat(new ShellShowingCondition("Progress Information"));
long startTime = System.currentTimeMillis();
ui.click(new TableItemLocator("Load Dialog", new ViewLocator("package.views.toolsview")));
System.out.println("TIME Taken" + (System.currentTimeMillis() - startTime));
ui.assertThat(new ShellShowingCondition("Progress Information"));
TIME Taken: 15096
com.windowtester.runtime.WaitTimedOutException: Timed out waiting for condition:
toString=shell titled: Progress Information to show
class=com.windowtester.runtime.swt.condition.shell.ShellShowingCondition
at com.windowtester.runtime.swt.internal.UIContextSWT.wait(UIContextSWT.java:776)
at com.windowtester.runtime.swt.internal.UIContextSWT.wait(UIContextSWT.java:748)
at com.windowtester.runtime.internal.AssertionHandler.waitFor(AssertionHandler.java:69)
at com.windowtester.runtime.internal.AssertionHandler.assertThat(AssertionHandler.java:37)
at com.windowtester.internal.runtime.UIContextCommon.assertThat(UIContextCommon.java:172)
at package.uitest.UIDialogTest.testUIComponents(UIDialogTest.java:165)
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: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)
try {
this.progressService.runInUI(this.progressService, new IRunnableWithProgress() {
public void run(final IProgressMonitor progressMonitor) {
progressMonitor.beginTask("imager.......", 10);
try {
for (int j = 10; j > 5; --j) {
progressMonitor.subTask("starting graphics generator");
Thread.sleep(1000);
progressMonitor.worked(1);
}
int ok = GrapGenWrapper.executeBackend(generatedConfigFile);
for (int i = 5; i > 0; --i) {
progressMonitor.subTask("generating graphics");
Thread.sleep(1000);
progressMonitor.worked(2);
}
if (ok == 1) {
progressMonitor.worked(10);
}
else if (ok >= 5) {
ShowMessageHelper.showOkMessage(
MyDialogImplementation.this.parentShell,
Messages.configFile_error);
}
}
catch (Exception e) {
e.printStackTrace();
}
finally {
progressMonitor.done();
}
}
}, null);
}
catch (Exception e) {
e.printStackTrace();
}
Users browsing this forum: No registered users and 1 guest