Problem with TreeItemLocator

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

Problem with TreeItemLocator

Postby 3061 » Fri Apr 24, 2009 1:51 am

I'm trying to make WindowTester Check wheter "C1" correctly appears in the same row as "I1":
List View.PNG
List View.PNG (6.36 KiB) Viewed 884 times


However, when I use the recorder to click on any of the columsn in that row, it always outputs:
Code: Select all
ui.click(new TreeItemLocator("I1", new SWTWidgetLocator(Tree.class, 0, new SWTWidgetLocator(CTabFolder.class))));


This may be because this table is implemented as a tree (when the user clicks on "Group View" on the bottom left, it shows the entries as a tree), but in Group view, the Recorder says "unknown Widget" and outputs "ui.click();" when I click on anything in there during recording.

Are those kind of trees not yet supported by WindowTeste?
3061
 
Posts: 42
Joined: Mon Feb 23, 2009 12:43 am

Re: Problem with TreeItemLocator

Postby Phil Quitslund » Mon Apr 27, 2009 11:16 am

Tree Cells are not supported by the recorder as of yet but are supported in the runtime. For example, your sample locator might be
re-written something like this:

Code: Select all
ui.click(new TreeCellLocator("I1").at(column(2)).in(new SWTWidgetLocator(Tree.class, 0, new SWTWidgetLocator(CTabFolder.class))));

If this doesn't work for you, please let us know.

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

Re: Problem with TreeItemLocator

Postby 3061 » Wed Apr 29, 2009 2:55 am

Phil Quitslund wrote:Tree Cells are not supported by the recorder as of yet but are supported in the runtime. For example, your sample locator might be
re-written something like this:

Code: Select all
ui.click(new TreeCellLocator("I1").at(column(2)).in(new SWTWidgetLocator(Tree.class, 0, new SWTWidgetLocator(CTabFolder.class))));

If this doesn't work for you, please let us know.

Thanks!

Doesn't seem to work or I'm not doin it right...

This works for getting the first Element, i.e. everything on the left-most column:
Code: Select all
ui.click(numberOfClicks, new TableItemLocator(tableItemString, viewLocator));


This should do the exact same thing, but it doesn't work (WIDGET NOT FOUND). I also tried it with Column(0), new Column(2), new Column(3), etc.
Code: Select all
ui.click(numberOfClicks, new TreeCellLocator(tableItemString).at(new Column(1)).in(viewLocator));


PS:
Code: Select all
int numberOfClicks = 2;
ViewLocator viewLocator = new ViewLocator(classPathOfTheView);
String tableItemString = "I1";
3061
 
Posts: 42
Joined: Mon Feb 23, 2009 12:43 am

Re: Problem with TreeItemLocator

Postby gnebling » Thu Apr 30, 2009 8:45 am

Could you please log a bug report to wintest-support (at) instantiations.com (if you haven't already) for tracking. Thanks
gnebling
Moderator
 
Posts: 243
Joined: Tue Aug 22, 2006 7:49 am

Re: Problem with TreeItemLocator

Postby 3061 » Mon May 04, 2009 4:43 am

I found out we're using some deprecated "TreeTable" which will eventually be rewritten into a seperate (standard) Tree and Table Viewer. Tables and Trees work fine with WindowTester, I wouldn't waste much energy in fixing bugs for deprecated stuff.

I'll report it anyway, suggesting to mention it in the documentation that deprecated TreeTables are not fully supported.
3061
 
Posts: 42
Joined: Mon Feb 23, 2009 12:43 am

Re: Problem with TreeItemLocator

Postby Phil Quitslund » Mon May 04, 2009 7:53 am

Nice catch! Thanks for the update!
--
Phil Quitslund
Software Engineer
Google, Inc.
Phil Quitslund
Moderator
 
Posts: 491
Joined: Fri Apr 28, 2006 6:26 am

Re: Problem with TreeItemLocator

Postby 3061 » Tue May 05, 2009 12:33 am

done
3061
 
Posts: 42
Joined: Mon Feb 23, 2009 12:43 am

Re: Problem with TreeItemLocator

Postby Phil Quitslund » Wed May 06, 2009 10:20 am

Thanks! We'll update the docs and let you know.
--
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