Skip to main content



      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 18:48 Go to next message
Eclipse UserFriend
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/
Re: How to select a TREE item in a TABLE? [message #1421343 is a reply to message #1421074] Thu, 11 September 2014 04:36 Go to previous messageGo to next message
Eclipse UserFriend
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,
Re: How to select a TREE item in a TABLE? [message #1421394 is a reply to message #1421074] Thu, 11 September 2014 06:07 Go to previous messageGo to next message
Eclipse UserFriend
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 14:18 Go to previous message
Eclipse UserFriend
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();

[Updated on: Wed, 01 October 2014 15:02] by Moderator

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


Current Time: Sun May 11 05:29:24 EDT 2025

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

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

Back to the top