Multiple selection

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

Multiple selection

Postby JLomin » Tue Feb 06, 2007 6:51 am

Hello,
I want to ask you, if it is possible with WindowTester to select one element of a tree, and then another one, keeping selected the first one, in the typical multiple selection with CTRL.

I mean:
1- click the first node.
2- press CTRL in order to handle the first node.
3- click the second node.

Thanks!
JLomin
 
Posts: 11
Joined: Mon Feb 05, 2007 11:40 pm

Postby Phil Quitslund » Tue Feb 06, 2007 9:16 am

This is the method you want to call:

Code: Select all
com.windowtester.swt.IUIContext.click(String, String, int)


An example looks like this:

Code: Select all
ui.click("my.tree", "path/to/item", SWT.BUTTON1 | SWT.SHIFT);
--
Phil Quitslund
Software Engineer
Google, Inc.
Phil Quitslund
Moderator
 
Posts: 491
Joined: Fri Apr 28, 2006 6:26 am

Postby JLomin » Tue Feb 06, 2007 11:23 pm

Thanks Mr.Quitslund. :D
You show me the SHIFT-way multiple selection.

This is the CTRL-way multiple selection if somebody wants to know it:

Code: Select all
ui.click("my.tree", "path/to/item1");
ui.click("my.tree", "path/to/item2", SWT.CTRL | SWT.BUTTON1);
JLomin
 
Posts: 11
Joined: Mon Feb 05, 2007 11:40 pm

Postby Phil Quitslund » Wed Feb 07, 2007 5:16 am

Exactly right! :D
--
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