code: public String waitForMenuShown(String menuName) {
      if (getScopeServices().getConnection() == null) {
        throw new CommunicationException(
            "waiting for a window failed because Opera is not connected.");
      }
  
      return getScopeServices()
          .waitForMenuShown(menuName, OperaIntervals.MENU_EVENT_TIMEOUT.getMs());
    }
docs: Waits until the menu is shown, and then returns the name of the window
  
  @param menuName window to wait for shown event on
  @return id of window