Hello everyone,
Im having a bit of a problem while trying to make an GUI test for my application im writing in Eclipse RCP.
The following thing occurs:
Im recording a test and i click on two buttons, but WindowTester makes from it:
public void testWindowTesterAddUser() throws Exception {
IUIContext ui = getUI();
ui.click(2, new TreeItemLocator("prdbebe125081/test4bart",
new ViewLocator("SVN_ADMIN_APP.TreeView")));
ui.click(new LabeledLocator(StyledText.class,
"Fill in the users that you want to add, seperated with a ;"));
ui.enterText("bverelle");
ui.click(new LabeledLocator(Button.class, "Name(s):"));
ui.click(new LabeledLocator(Button.class, "Name(s):"));
ui.wait(new ShellShowingCondition("Confirm"));
ui.click(new ButtonLocator("OK"));
ui.wait(new ShellDisposedCondition("Confirm"));
ui.click(new ButtonLocator("Save changes locally"));
// ui.close(new SWTWidgetLocator(Shell.class, "RUM4SVN"));
//ui.wait(new ShellDisposedCondition("RUM4SVN"));
}
And here lies the problem, Name(s): is a label on the same editor. And if i run the test, it give an error:
(the problem is in bold)
com.windowtester.runtime.WaitTimedOutException: Timed out waiting for condition:
toString=shell titled: Confirm to show
class=com.windowtester.runtime.swt.condition.shell.ShellShowingCondition
at com.windowtester.runtime.swt.internal.UIContextSWT.wait(UIContextSWT.java:775)
at com.windowtester.runtime.swt.internal.UIContextSWT.wait(UIContextSWT.java:747)
at com.windowtester.runtime.swt.internal.UIContextSWT.wait(UIContextSWT.java:740)
at com.jnj.svn_admin.testing.WindowTesterAddUser.testWindowTesterAddUser(WindowTesterAddUser.java:30)
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 com.windowtester.runtime.common.UITestCaseCommon.access$001(UITestCaseCommon.java:25)
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)
If i change it to:
ui.click(new ButtonLocator("Check names"));
ui.click(new ButtonLocator("Add user(s)"));
because this is what it should be, it works fine. Is this some kind of bug, or just an error somewhere in my code?
Kind regards,
Bart Verellen