In Eclipse if you go to view the Problems View (Windows>Show View>Other>Problems), the number of errors , warnings and items are displayed. I want to capture the text of the Label (0 errors, 2 warnings, 0 others). When I record the test case, the following code is generated.
public void testshikha1() throws Exception {
IUIContext ui = getUI();
ui.click(new SWTWidgetLocator(Label.class, "0 errors, 2 warnings, 0 others"));
ui.click(new CTabItemLocator("Properties"));
ui.click(new MenuItemLocator("File/Exit"));
When I run this test case an exception "Widget Not Found Exception" is displayed. Please refer to the below error stack:
com.windowtester.runtime.WidgetNotFoundException: Widget NOT Found:
SWTWidgetLocator(org.eclipse.swt.widgets.Label, 0 errors, 2 warnings, 0 others)
at com.windowtester.runtime.swt.internal.UIContextSWT.find(UIContextSWT.java:616)
at com.windowtester.runtime.swt.internal.UIContextSWT.find(UIContextSWT.java:591)
at com.windowtester.runtime.swt.internal.UIContextSWT.find(UIContextSWT.java:591)
at com.windowtester.runtime.swt.internal.UIContextSWT.find(UIContextSWT.java:591)
at com.windowtester.runtime.swt.internal.UIContextSWT.find(UIContextSWT.java:591)
at com.windowtester.runtime.swt.internal.UIContextSWT.find(UIContextSWT.java:591)
at com.windowtester.runtime.swt.internal.UIContextSWT.find(UIContextSWT.java:591)
at com.windowtester.runtime.swt.internal.UIContextSWT.find(UIContextSWT.java:591)
at com.windowtester.runtime.swt.internal.UIContextSWT.find(UIContextSWT.java:591)
at com.windowtester.runtime.swt.internal.UIContextSWT.find(UIContextSWT.java:591)
at com.windowtester.runtime.swt.internal.UIContextSWT.find(UIContextSWT.java:591)
at com.windowtester.internal.runtime.selector.ClickHelper.doFind(ClickHelper.java:193)
at com.windowtester.internal.runtime.selector.ClickHelper.click(ClickHelper.java:58)
at com.windowtester.internal.runtime.UIContextCommon.click(UIContextCommon.java:146)
at com.windowtester.runtime.swt.internal.UIContextSWT.click(UIContextSWT.java:338)
at com.windowtester.internal.runtime.UIContextCommon.click(UIContextCommon.java:139)
at com.windowtester.runtime.swt.internal.UIContextSWT.click(UIContextSWT.java:346)
at com.windowtester.internal.runtime.UIContextCommon.click(UIContextCommon.java:132)
at com.windowtester.runtime.swt.internal.UIContextSWT.click(UIContextSWT.java:308)
at com.vmware.vide.test.testsuite.devkit.cimpdk.shikha1.testshikha1(shikha1.java:29)
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:168)
at junit.framework.TestCase.runBare(TestCase.java:134)
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)
Can someone help me with the solution.
Thanks in advance..
Shikha