use of org.eclipse.reddeer.workbench.impl.view.WorkbenchView in project jbosstools-openshift by jbosstools.
the class NodeJSAppDebugTest method getVariable.
/**
* getVariable from Variables view.
*
* @param variable
* name
* @return TreeItem
*/
protected TreeItem getVariable(String name) {
WorkbenchView variables = new WorkbenchView("Variables");
variables.activate();
DefaultTree variablesTree = new DefaultTree();
TreeItem var = null;
try {
new WaitUntil(new TreeContainsItem(variablesTree, new WithTextMatcher(name), false));
} catch (WaitTimeoutExpiredException e) {
// not found
return null;
}
List<TreeItem> vars = variablesTree.getItems();
for (TreeItem i : vars) {
if (i.getText().equals(name)) {
var = i;
}
}
return var;
}
Aggregations