protected JMenuItem waitItem(ComponentOperator oper, MenuElement element, PathChooser chooser, int depth) {
Waiter waiter = new Waiter(new JMenuItemWaiter(element, chooser, depth));
waiter.setOutput(oper.getOutput().createErrorOutput());
waiter.setTimeouts(oper.getTimeouts());
try {
return((JMenuItem)waiter.waitAction(null));
} catch(InterruptedException e) {
throw(new JemmyException("Waiting has been interrupted", e));
}
}