public static void sikuliType(LiferaySelenium liferaySelenium, String image, String value)
      throws Exception {

    sikuliClick(liferaySelenium, image);

    liferaySelenium.pause("1000");

    Keyboard keyboard = new DesktopKeyboard();

    if (value.contains("${line.separator}")) {
      String[] tokens = StringUtil.split(value, "${line.separator}");

      for (int i = 0; i < tokens.length; i++) {
        keyboard.type(tokens[i]);

        if ((i + 1) < tokens.length) {
          keyboard.type(Key.ENTER);
        }
      }

      if (value.endsWith("${line.separator}")) {
        keyboard.type(Key.ENTER);
      }
    } else {
      keyboard.type(value);
    }
  }
  public static void sikuliUploadTCatFile(
      LiferaySelenium liferaySelenium, String image, String value) throws Exception {

    String tCatAdminFileName = PropsValues.TCAT_ADMIN_REPOSITORY + "/" + value;

    if (OSDetector.isWindows()) {
      tCatAdminFileName = tCatAdminFileName.replace("/", "\\");
    }

    sikuliType(liferaySelenium, image, tCatAdminFileName);

    Keyboard keyboard = new DesktopKeyboard();

    keyboard.type(Key.ENTER);
  }
  public static void sikuliUploadCommonFile(
      LiferaySelenium liferaySelenium, String image, String value) throws Exception {

    sikuliClick(liferaySelenium, image);

    Keyboard keyboard = new DesktopKeyboard();

    keyboard.keyDown(Key.CTRL);

    keyboard.type("a");

    keyboard.keyUp(Key.CTRL);

    sikuliType(
        liferaySelenium,
        image,
        getPortalRootDirName() + liferaySelenium.getDependenciesDirName() + value);

    keyboard.type(Key.ENTER);
  }
  public static void sikuliUploadTempFile(
      LiferaySelenium liferaySelenium, String image, String value) throws Exception {

    sikuliClick(liferaySelenium, image);

    Keyboard keyboard = new DesktopKeyboard();

    keyboard.keyDown(Key.CTRL);

    keyboard.type("a");

    keyboard.keyUp(Key.CTRL);

    String slash = "/";

    if (OSDetector.isWindows()) {
      slash = "\\";
    }

    sikuliType(liferaySelenium, image, liferaySelenium.getOutputDirName() + slash + value);

    keyboard.type(Key.ENTER);
  }