Hello,
My test code throws a WidgetNotFoundException at runtime. Below is the stack trace I received:
com.windowtester.runtime.WidgetNotFoundException: Component not found WidgetLocator(javax.swing.JTable):
class=class javax.swing.JFrame
name=frame0
title=SimpleTableDemo
at com.windowtester.internal.swing.UIContextSwing.find(UIContextSwing.java:200)
at com.windowtester.internal.runtime.selector.ClickHelper.doFind(ClickHelper.java:187)
at com.windowtester.internal.runtime.selector.ClickHelper.click(ClickHelper.java:52)
at com.windowtester.internal.runtime.UIContextCommon.click(UIContextCommon.java:140)
at com.windowtester.internal.swing.UIContextSwing.click(UIContextSwing.java:57)
at com.windowtester.internal.runtime.UIContextCommon.click(UIContextCommon.java:133)
at com.windowtester.internal.runtime.UIContextCommon.click(UIContextCommon.java:126)
at ClickRow.testClickRow(ClickRow.java:20)
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$0(UITestCaseCommon.java:1)
at com.windowtester.runtime.common.UITestCaseCommon$2.run(UITestCaseCommon.java:130)
at com.windowtester.runtime.common.UITestCaseCommon$3.run(UITestCaseCommon.java:151)
at com.windowtester.internal.runtime.junit.core.SequenceRunner$1.run(SequenceRunner.java:40)
I believe the cause of the exception is because the JTable variable in the main class was instantiated to an object with type of anonymous and subclass of the javax.swing.JTable class. Please refer to the modified SimpleTableDemo.java line 77 for details.
Does anyone know the fix for this issue? Your help is greatly appreciated!
Thank you.
-keico