Hello,
I have a problem with clicking on a TreeItem which is not uniquely identifed by its name.
We have something like this: A tree which has certain final nodes with the same name. E.g.:
rootNode/node
rootNode/node
...
rootNode/node
When clicking on a certain node inside the tree, another view of the application(properties view) displays info about the node.
In order to access(to click) a particular node (e.g the third) I tried something like this:
final IWidgetLocator[] findAll = ui.findAll(new TreeItemLocator("rootNode/node",new SWTWidgetLocator(Tree.class, new SWTWidgetLocator (ViewForm.class))));
Display.getDefault().syncExec(new Runnable() {
public void run() {
try {
ui.click(findAll[2]);
}
}
catch (Exception e) {
e.printStackTrace();
}
}
});
Even though, at playback, it's the first item that is clicked -> I cannot acces the info associated with any other node but the first.
Can you help me with this?
Thanks a lot.