Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » How to Access a Tree inside a CTab?(How to Access a Tree inside a CTab?)
How to Access a Tree inside a CTab? [message #1648440] Tue, 03 March 2015 23:06 Go to next message
Saar Sagir is currently offline Saar SagirFriend
Messages: 4
Registered: March 2015
Junior Member
I am trying to access the tree within the CTab

index.php/fa/21057/0/

If anyone knows a way to get an instance of that tree so I can expand the nodes and access the items inside, would be greatly appreciated.
Most of the methods below works for tabs that are easy to access with a single tree such as the picture below, however they are unable to detect the tree when it is embedded inside
index.php/fa/21057/0/

Currently these are the things I have tried, each giving a Widget Not Found Invocation Error.

1.
SWTBotTree tree = bot.tree();
SWTBotTreeItem treeNode = tree.getTreeItem("Import Data Structures Manager"); // ERROR

2.
SWTBotView view = bot.viewByTitle("ImportDataStructuresManager.wfm"); // ERROR
view.show();
view.setFocus();

3.
bot.tree().getTreeItem("ImportDataStructuresManager.wfm").select(); //ERROR

4.
tree = View.getTree("ImportDataStructuresManager.wfm"); //ERROR
tree.expandNode(dbName).select(segName).contextMenu(MANAGE_SEGMENT_TITLE).click();
return true;

Any help is appreciated
  • Attachment: eclipseh.JPG
    (Size: 41.02KB, Downloaded 658 times)
  • Attachment: eclipse2.JPG
    (Size: 13.76KB, Downloaded 221 times)
Re: How to Access a Tree inside a CTab? [message #1683746 is a reply to message #1648440] Wed, 18 March 2015 06:29 Go to previous messageGo to next message
Hake Huang is currently offline Hake HuangFriend
Messages: 1
Registered: March 2015
Junior Member
I have the same problem, and I use below code try to retrieve all controller under current shell, there is no table or tree.

ControlFinder controlFinder = new ControlFinder();
java.util.List<Widget> findControls = controlFinder.findControls(withRegex(".*"));
Re: How to Access a Tree inside a CTab? [message #1717350 is a reply to message #1683746] Fri, 11 December 2015 23:43 Go to previous messageGo to next message
Shabari shetty is currently offline Shabari shettyFriend
Messages: 8
Registered: December 2012
Junior Member
Why don't you try using the eclipse spy view to ensure whether the element is tree or not?
Re: How to Access a Tree inside a CTab? [message #1717351 is a reply to message #1717350] Fri, 11 December 2015 23:48 Go to previous message
Shabari shetty is currently offline Shabari shettyFriend
Messages: 8
Registered: December 2012
Junior Member
Try this..

SWTBot editorBot = bot.editorByTitle("ImportDataStructuresManager.wfm").bot();
SWTBotTreeItem DHNode= editorBot.tree().getAllItems()[0];
Previous Topic:Injecting an object in a Context in SWTBot test
Next Topic:Not able to detect Combo box with org.eclipse.jface.fieldassist.SimpleContentProposalProvider
Goto Forum:
  


Current Time: Fri Apr 26 23:01:34 GMT 2024

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

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

Back to the top