private static GalenPageAction waitActionFrom(String[] args) {
    if (args.length < 2) {
      throw new SyntaxException("the timeout is not specified");
    }

    GalenPageActionWait wait = new GalenPageActionWait();
    wait.setTimeout(parseTimeout(args[1]));

    if (args.length > 2) {
      parseUntilConditions(wait, args);
    }
    return wait;
  }