Unable to select second combo box in tableItem Locator

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

Unable to select second combo box in tableItem Locator

Postby kkkarthick » Mon Apr 14, 2008 4:22 am

Could you plz help me, how to select second combo Item in the same table.

First comboItem is selecting successfully. but second one is not selecting.

here is the code i am using:

ui.click(new TableItemLocator("Sample")); //first table in the window

ui.click(new ColumnLocator(1, new TableItemLocator("parameter1"))); //first column of second table
ui.click(new CComboItemLocator("?")); //first comboItem in the second table that is 2nd column in the table. this is working fine

//selecting second combo item
ui.click(new ColumnLocator(1, new TableItemLocator("parameter1")));
ui.click(new CComboItemLocator("In")); //second comboItem in the table, that is 3rd column in the table.

1) //i tried so many ways. still not able to select the second combo box
ui.click(new ComboItemLocator("In",new ColumnLocator(1, new TableItemLocator(" ")))); //second combo Item contains " ", "In" and etc..

2.) ui.click(new ComboItemLocator("In",new SWTWidgetLocator(Combo.class,0,new SWTWidgetLocator(Group.class,"In/Out")))); // "In/Out" is the column header of the table.
//ui.click(new TableCellLocator(1,"In/Out")); //This also not working
ui.click(new CComboItemLocator("In"));

could you please help me this.
Posts: 3
Joined: Sun Jan 27, 2008 9:46 pm

Re: Unable to select second combo box in tableItem Locator

Postby alexfr » Tue Apr 15, 2008 12:52 am


I hope I understand what you mean: You should name the combo boxes and try this code:

Code: Select all
ui.click(new ComboItemLocator("In", new NamedWidgetLocator("name of the combo box")));

Posts: 4
Joined: Tue Jul 17, 2007 7:30 am

Re: Unable to select second combo box in tableItem Locator

Postby Phil Quitslund » Tue Apr 15, 2008 10:10 am

Thanks Alex. That should work! (But let us know otherwise.... :( )
Phil Quitslund
Software Engineer
Google, Inc.
Phil Quitslund
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