maxTime.start();
while(!chooser.checkPathComponent(0, (menuObject = getSelectedElement(bar)))) {
pressKey(KeyEvent.VK_RIGHT, 0);
releaseKey(KeyEvent.VK_RIGHT, 0);
if(maxTime.expired()) {
throw(new TimeoutExpiredException("AppleMenuDriver: can not find an appropriate menu!"));
}
}
for(int depth = 1; depth < chooser.getDepth(); depth++) {
// TODO - wait for menu item
int elementIndex = getDesiredElementIndex(menuObject, chooser, depth);