NamedWidgetLocator has bug

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

NamedWidgetLocator has bug

Postby arpitdesai » Thu Apr 16, 2009 2:25 pm

Hi,

I am calling NamedWidgetLocator with a specific Widget Type and it still gives too many widget found.
Code: Select all
ui.click(new NamedWidgetLocator(Button.class, "xyz"));

Code: Select all
com.windowtester.runtime.MultipleWidgetsFoundException: Multiple Widgets Found:
looking for
  NamedWidgetLocator("xyz")
and found:
  WidgetReference(Button {...})
  WidgetReference(Text {})
   at com.windowtester.runtime.swt.internal.UIContextSWT.find(UIContextSWT.java:606)
   at com.windowtester.runtime.swt.internal.UIContextSWT.find(UIContextSWT.java:583)
   at com.windowtester.runtime.swt.internal.UIContextSWT.find(UIContextSWT.java:583)
   at com.windowtester.runtime.swt.internal.UIContextSWT.find(UIContextSWT.java:583)

I think this is a bug.
Thanks,
- Arpit
arpitdesai
 
Posts: 6
Joined: Thu Apr 16, 2009 6:56 am

Re: NamedWidgetLocator has bug

Postby Phil Quitslund » Thu Apr 16, 2009 8:57 pm

Indeed this doesn't look right! Could you submit a bug report? We'll get an engineer working on a repro and fix. Thanks!

wintest-support@instantiations.com

(Out of curiosity, do these widgets all have this name?)

Thanks for the catch!

-phil
--
Phil Quitslund
Software Engineer
Google, Inc.
Phil Quitslund
Moderator
 
Posts: 491
Joined: Fri Apr 28, 2006 6:26 am

Re: NamedWidgetLocator has bug

Postby arpitdesai » Fri Apr 17, 2009 7:25 am

Phil,

Yes these widgets have same name. It's like if a field in form has a label, text and a button associated with it, they all get the same name (that of the label) and at runtime I distinguish which type was selected.

I have posted the bug report.

Thanks,
- Arpit
arpitdesai
 
Posts: 6
Joined: Thu Apr 16, 2009 6:56 am

Re: NamedWidgetLocator has bug

Postby Phil Quitslund » Mon Apr 20, 2009 10:27 am

This is now fixed in the latest beta.

http://www.instantiations.com/windowtes ... nload.html

Please check it out and let us know if you still see issues.

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