Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » How to select a TREE item in a TABLE?
How to select a TREE item in a TABLE? [message #1421074] Wed, 10 September 2014 22:48 Go to next message
Minnie P is currently offline Minnie PFriend
Messages: 14
Registered: January 2013
Junior Member
Hi,
I have been trying to select this tree item in the the given table and then click on the button on the right.But it complaints saying that my widget was not found.
I have attached a screenshot of the editor page.
Please help me on how to code this.

I'm trying to select "Rename this Input and Output Pair" and then click "Import Messages..." button.

index.php/fa/19104/0/


Thanks,
Minnie
Re: How to select a TREE item in a TABLE? [message #1421343 is a reply to message #1421074] Thu, 11 September 2014 08:36 Go to previous messageGo to next message
Benjamin Ratiarisolo is currently offline Benjamin RatiarisoloFriend
Messages: 16
Registered: January 2010
Location: Paris, France
Junior Member
Hi,

Giving a little bit more of precise contextual information about your issue would help other understanding your problem and provide answers to your question.

For instance:


  • What did you try?
  • Provide a concise code snippet illustrating where the WidgetNotFound exception is thrown
  • When is the WidgetNotFound exception thrown? When selecting the tree item or when retrieving the button?


Cheers,


--
Benjamin Ratiarisolo
IBM ODM Decision Server Rules - Software Developer
IBM Software - France Lab
Re: How to select a TREE item in a TABLE? [message #1421394 is a reply to message #1421074] Thu, 11 September 2014 10:07 Go to previous messageGo to next message
pawan garia is currently offline pawan gariaFriend
Messages: 39
Registered: February 2013
Member
Hi
You can try this Code, Something like this inthat you have to Select the Tree and then Expand the Tree.

SWTBotTable table=bot.table(TableIndex);
int rowcount=table.rowCount();
for (int i=0;i<rowcount;i++ )
{
if(table.cell(i,"Input and output Message Pair").equalsIgnoreCase("Rename this Input and Output Pair"))
{
table.click(i, columnName);

break;
}
}
Re: How to select a TREE item in a TABLE? [message #1421672 is a reply to message #1421394] Thu, 11 September 2014 18:18 Go to previous message
Minnie P is currently offline Minnie PFriend
Messages: 14
Registered: January 2013
Junior Member
Thanks pawan for the code.I will try it out.

@Benjamin here is the code I have used.I get a widget not found right when its trying to get the name of the editor.How do I try to get the focus onto the editor name TEST1.ttc or the tree "Input and Output Message Pair"?

tree = View.getTree(testcaseEditor);
bot.tree().getTreeItem("Input and Output Message Pair").getNode("Rename this Input and Output pair").select();
bot.button("Import Messages...").click();


Thanks,
Minnie

[Updated on: Wed, 01 October 2014 19:02]

Report message to a moderator

Previous Topic:How to handle unpredictable shells
Next Topic:Any Plans for Support in Eclipse LUNA ??
Goto Forum:
  


Current Time: Wed Sep 19 22:06:43 GMT 2018

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

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

Back to the top