Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » Setting values in the Properties View
Setting values in the Properties View [message #480316] Fri, 14 August 2009 20:06 Go to next message
Eclipse User
Originally posted by: jconlon.apache.org

Does anyone have an example on how to set values in a Properties View?
Not really sure how to get to a value column that has a combo box in it.

I can navigate the tree to the Property column like this
SWTBotTreeItem id = propTree.getTreeItem("Identification");
SWTBotTreeItem premNode = id.getNode("Premises");


but I am stumped on how to get to the pull down in the value column for
Premises.

Any suggestions?

thanks,
John
Re: Setting values in the Properties View [message #480400 is a reply to message #480316] Sun, 16 August 2009 15:48 Go to previous messageGo to next message
Stefan Seelmann is currently offline Stefan Seelmann
Messages: 11
Registered: July 2009
Junior Member
Hi John,

> I can navigate the tree to the Property column like this
> SWTBotTreeItem id = propTree.getTreeItem("Identification");
> SWTBotTreeItem premNode = id.getNode("Premises");
>
> but I am stumped on how to get to the pull down in the value column for
> Premises.

Try this to activate the cell editor:
premNode.click();
or
premNode.doubleClick();

Then try this to select the value
bot.comboBox().setSelection( "value" );

Then click to another node to finish
id.click();

HTH,
Stefan
Re: Setting values in the Properties View [message #480528 is a reply to message #480400] Mon, 17 August 2009 10:15 Go to previous message
Eclipse User
Originally posted by: jconlon.apache.org

Hi Stefan,

Yes that did it.

But I did need to change the comboBox() to
bot.ccomboBox().setSelection( "value" );


BTW your ContextMenuHelper was also a big help for selecting context menus.

thanks again!
John


Stefan Seelmann wrote:
> Hi John,
>
>> I can navigate the tree to the Property column like this
>> SWTBotTreeItem id = propTree.getTreeItem("Identification");
>> SWTBotTreeItem premNode = id.getNode("Premises");
>>
>> but I am stumped on how to get to the pull down in the value column for
>> Premises.
>
> Try this to activate the cell editor:
> premNode.click();
> or
> premNode.doubleClick();
>
> Then try this to select the value
> bot.comboBox().setSelection( "value" );
>
> Then click to another node to finish
> id.click();
>
> HTH,
> Stefan
Previous Topic:autocomplete?
Next Topic:No SWTBotTreeItem recursive expand
Goto Forum:
  


Current Time: Fri Aug 01 06:07:12 EDT 2014

Powered by FUDForum. Page generated in 0.11815 seconds