Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » test a combo in a table
test a combo in a table [message #27220] Thu, 12 March 2009 15:54 Go to next message
Brice Laurel is currently offline Brice LaurelFriend
Messages: 72
Registered: July 2009
Member
Hi list,

I want to test a table. I know that I can get it with
SWTBotTable table = bot.getTable();
In my table, I have a column which elements are selected on a list. I want
to do something likes this :
SWTBotItem item = table.getTableItem(1);
item.getColumn(2).ComboBox().setSelection("Web");
because this cell is a comboBox.

I don't know how I can do it with SWTBot.
Thanks in advance for your help.
Re: test a combo in a table [message #27259 is a reply to message #27220] Thu, 12 March 2009 16:19 Go to previous message
Ketan Padegaonkar is currently offline Ketan PadegaonkarFriend
Messages: 873
Registered: July 2009
Senior Member
The tests mentioned below may help you.

They basically click(or doubleclick) on the table cell, and expect a
text box to show up an set text in them. You'll need to do something
similar for combos.

[1] =
http://github.com/ketan/swtbot/blob/master/org.eclipse.swtbo t.swt.finder.test/src/org/eclipse/swtbot/swt/finder/widgets/ SWTBotTableDoubleClickTest.java

[2] -
http://github.com/ketan/swtbot/blob/master/org.eclipse.swtbo t.swt.finder.test/src/org/eclipse/swtbot/swt/finder/widgets/ SWTBotTableClickTest.java

-- Ketan


On 12/3/09 21:24, Brice Laurel wrote:
> Hi list,
>
> I want to test a table. I know that I can get it with SWTBotTable table
> = bot.getTable();
> In my table, I have a column which elements are selected on a list. I
> want to do something likes this :
> SWTBotItem item = table.getTableItem(1);
> item.getColumn(2).ComboBox().setSelection("Web");
> because this cell is a comboBox.
>
> I don't know how I can do it with SWTBot.
> Thanks in advance for your help.
>
>
>
Previous Topic:Getting menu from chevron (drop down arrow)
Next Topic:removing require-bundle headers
Goto Forum:
  


Current Time: Fri Apr 19 22:10:08 GMT 2024

Powered by FUDForum. Page generated in 0.03298 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top