I'm recording the next generated code with the tool, but when I execute the Test7, an exception was raised
- Code: Select all
public void testTest7() throws Exception {
IUIContext ui = getUI(); //executed OK
ui.click(new LabeledTextLocator("User")); //executed OK
ui.enterText("omas"); //executed OK
ui.keyClick(KeyEvent.VK_TAB); //executed OK
ui.enterText("omas"); //executed OK
ui.click(new JButtonLocator("Login")); //executed OK
ui.wait(new WindowDisposedCondition("Login")); //executed OK
ui.wait(new WindowDisposedCondition("Loading...")); //executed OK
ui.wait(new WindowDisposedCondition("Loading...")); //executed OK
ui.click(new JButtonLocator("Product Administration")); //executed OK
ui.click(new JTreeItemLocator("Menu/Serie",
new SwingWidgetLocator(JViewport.class, new SwingWidgetLocator(
JScrollPane.class, new SwingWidgetLocator(JPanel.class,
1, new NamedWidgetLocator("menu")))))); //An exception has occured "component not found"
ui.wait(new WindowDisposedCondition("L - v. 3.4"));
}
In the last ui.click I getting the exception. Its generate the next stack trace
- Code: Select all
com.windowtester.runtime.WidgetNotFoundException: Component not found JTreeItemLocator("Menu/Serie", WidgetLocator(javax.swing.JViewportWidgetLocator(javax.swing.JScrollPaneWidgetLocator(javax.swing.JPanel1, NamedWidgetLocator("menu"))))):
class=class com.lumina.lumina.gui.login.LuminaLogin
name=dialog0
title=Login
class=class com.lumina.lumina.gui.Main
name=frame0
title=L - v. 3.4
at com.windowtester.internal.swing.UIContextSwing.find(UIContextSwing.java:200)
at com.windowtester.internal.runtime.selector.ClickHelper.doFind(ClickHelper.java:192)
at com.windowtester.internal.runtime.selector.ClickHelper.click(ClickHelper.java:58)
at com.windowtester.internal.runtime.UIContextCommon.click(UIContextCommon.java:82)
at com.windowtester.internal.swing.UIContextSwing.click(UIContextSwing.java:71)
at com.windowtester.internal.runtime.UIContextCommon.click(UIContextCommon.java:75)
at com.windowtester.internal.runtime.UIContextCommon.click(UIContextCommon.java:68)
at tests.Test7.testTest7(Test7.java:40)
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:585)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
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)
Do you know how can I fix this issue?
Regards,
Federico