JTreeItemLocator excpetion "Component 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

JTreeItemLocator excpetion "Component not found"

Postby fostermann » Mon Nov 17, 2008 10:25 am

Hello, I'm using WindoTester for Swing.

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
fostermann
 
Posts: 1
Joined: Mon Nov 17, 2008 8:55 am

Re: JTreeItemLocator excpetion "Component not found"

Postby Phil Quitslund » Tue Nov 25, 2008 2:15 pm

This looks like something to pick up with support (wintest-support@instantiations.com). When you do, please include the screenshot for the failure.

http://downloads.instantiations.com/Win ... shots.html

Thanks!
--
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