oper.waitComponentVisible(true);
oper.waitComponentEnabled();
} catch(InterruptedException e) {
throw(new JemmyException("Interrupted!", e));
}
MouseDriver mDriver = DriverManager.getMouseDriver(oper);
//mDriver.enterMouse(oper);
//use enhanced algorithm instead
smartMove(lastItem, oper);
if(depth > chooser.getDepth() - 1) {
if(oper instanceof JMenuOperator &&
menuBar != null && getSelectedElement(menuBar) != null) {
//mDriver.enterMouse(oper);
} else {
DriverManager.getButtonDriver(oper).push(oper);
}
return(oper.getSource());
}
if(pressMouse && !((JMenuOperator)oper).isPopupMenuVisible() &&
!(menuBar != null && getSelectedElement(menuBar) != null)) {
DriverManager.getButtonDriver(oper).push(oper);
}
oper.getTimeouts().sleep("JMenuOperator.WaitBeforePopupTimeout");
JMenuItem item = waitItem(oper, waitPopupMenu(oper), chooser, depth);
mDriver.exitMouse(oper);
if(item instanceof JMenu) {
JMenuOperator mo = new JMenuOperator((JMenu)item);
mo.copyEnvironment(oper);
return(push(mo, oper, null, chooser, depth + 1, false));
} else {