Combo Widget Not Found

WindowTester allows you to easily create and run unit tests for every GUI they build. It can also be used to generate system level tests.

Moderators: gnebling, Eric Clayberg, Dan Rubel, keertip, Phil Quitslund

Combo Widget Not Found

Postby doransn » Wed Nov 25, 2009 7:47 am

Hi,

I am trying to perform a simple test for my RCP application.
The test consists of the following code. It was generated using the Recorder.

IUIContext ui = getUI();
ui.click(new CTabItemLocator("FTO Approval"));
ui.click(new ComboItemLocator("TEST, USER", new ViewLocator( "com.lit.bacp.perspective.calendar.FTOApprovalView")));

The following error is thrown when I run the test.
The combo is visible on the screen at all times and there is only one combo on this view.

com.windowtester.runtime.WidgetNotFoundException: Widget NOT Found:
ComboItemLocator("TEST, USER", ViewLocator [com.lit.bacp.perspective.calendar.FTOApprovalView])
at com.windowtester.runtime.swt.internal.UIContextSWT.find(UIContextSWT.java:609)
at com.windowtester.runtime.swt.internal.UIContextSWT.find(UIContextSWT.java:584)
at com.windowtester.runtime.swt.internal.UIContextSWT.find(UIContextSWT.java:584)
at com.windowtester.runtime.swt.internal.UIContextSWT.find(UIContextSWT.java:584)
at com.windowtester.runtime.swt.internal.UIContextSWT.find(UIContextSWT.java:584)
at com.windowtester.runtime.swt.internal.UIContextSWT.find(UIContextSWT.java:584)
at com.windowtester.runtime.swt.internal.UIContextSWT.find(UIContextSWT.java:584)
at com.windowtester.runtime.swt.internal.UIContextSWT.find(UIContextSWT.java:584)
at com.windowtester.runtime.swt.internal.UIContextSWT.find(UIContextSWT.java:584)
at com.windowtester.runtime.swt.internal.UIContextSWT.find(UIContextSWT.java:584)
at com.windowtester.runtime.swt.internal.UIContextSWT.find(UIContextSWT.java:584)
at com.windowtester.runtime.swt.locator.ComboItemLocator.click(ComboItemLocator.java:85)
at com.windowtester.internal.runtime.selector.ClickHelper.doClick(ClickHelper.java:178)
at com.windowtester.internal.runtime.selector.ClickHelper.click(ClickHelper.java:65)
at com.windowtester.internal.runtime.UIContextCommon.click(UIContextCommon.java:87)
at com.windowtester.runtime.swt.internal.UIContextSWT.click(UIContextSWT.java:297)
at com.windowtester.internal.runtime.UIContextCommon.click(UIContextCommon.java:80)
at com.windowtester.runtime.swt.internal.UIContextSWT.click(UIContextSWT.java:305)
at com.windowtester.internal.runtime.UIContextCommon.click(UIContextCommon.java:73)
at com.windowtester.runtime.swt.internal.UIContextSWT.click(UIContextSWT.java:288)
at capacityplannertest.FTOApproval.testFTOApproval(FTOApproval.java:17)
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)


Any help would be appreciated.

Thanks,
Neil
doransn
 
Posts: 1
Joined: Wed Nov 25, 2009 7:34 am

Re: Combo Widget Not Found

Postby Phil Quitslund » Mon Nov 30, 2009 1:54 pm

Is it possible that it is a CCombo (in which case you'd want a CComboItemLocator)? Is this code what the recorder generated?
--
Phil Quitslund
Software Engineer
Google, Inc.
Phil Quitslund
Moderator
 
Posts: 491
Joined: Fri Apr 28, 2006 6:26 am


Return to Window Tester

Who is online

Users browsing this forum: No registered users and 1 guest