ui.click(TreeItemLocator) and identical viewed file names

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

ui.click(TreeItemLocator) and identical viewed file names

Postby Eugeniy_N » Tue Mar 04, 2008 4:25 am

There is specialized Project Explorer.
In specialized project and in specialized folder - viewed file names may by identical.
For use ui.contextClick() we are needed for click by the both files (for merge/compare operations).
Once, both clicks on the top viewed file.

May be use constructor TreeItemLocator(int modifiers, java.lang.String fullPath, int index, com.windowtester.runtime.locator.IWidgetLocator parent) - ?

int index - set as 0, then click. And set as 1 and the click. And then required contextClicl - ?

Not. Both clicks - on the top viewed file. On the second file on former to click it is not possible, it is not achievable.

How to be?
Eugeniy_N
 
Posts: 3
Joined: Tue Jan 29, 2008 4:19 pm

Re: ui.click(TreeItemLocator) and identical viewed file names

Postby Phil Quitslund » Tue Mar 04, 2008 8:24 am

This is a limitation in the current implementation of TreeItemLocator: it does not support handling of identical paths. Could you please send a feature request to:

wintest-support-list@instantiations.com

In the meantime, perhaps you can do something like this:

Code: Select all
ui.click(new TreeItemLocator("path/to/item")); //reveal and click the first one
IWidgetLocator items[] = ui.findAll(new TreeItemLocator("path/to/item"));
ui.contextClick(WT.SHIFT, items[1], "menu/path")); //context-click the second one


Hope this helps!
--
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