/**
   * Recommendation location name that you can not enter more than 51 characters
   *
   * @throws InterruptedException
   */
  public void Recommend_Name_Max() throws InterruptedException {
    String over_str = "1234567890123456789012345678901234567890123456789E-------";
    String value;

    wr.Position_Add();

    wr.Type_Rule();

    wr.Edit_Positionname(over_str);

    value = Common.Element_Value("bp_text#name", 0);

    if (!value.equals("1234567890123456789012345678901234567890123456789E")) {
      System.out.println("TEST FAILED!!\n\n" + StackTrace.calledFrom());
    }

    over_str = "樂愛創意樂愛創意樂愛創意樂愛創意樂愛創意樂愛創意樂愛創意樂愛創意樂愛創意樂愛創意樂愛創意樂愛創意樂愛~~~";

    wr.Edit_Positionname(over_str);

    value = Common.Element_Value("bp_text#name", 0);

    if (!value.equals("樂愛創意樂愛創意樂愛創意樂愛創意樂愛創意樂愛創意樂愛創意樂愛創意樂愛創意樂愛創意樂愛創意樂愛創意樂愛創")) {
      System.out.println("TEST FAILED!!\n\n" + StackTrace.calledFrom());
    }

    wr.Edit_Positionname("樂愛創意樂愛創意樂愛創意樂愛創意樂愛創意樂愛創意樂愛創意樂愛創意樂愛創意樂愛創意樂愛創意樂愛創意樂愛");

    wr.Position_Cancel();

    return;
  }
  /**
   * Check the display item of each recommendation method
   *
   * @throws InterruptedException
   */
  public void Type_ItemCheck() throws InterruptedException {
    String filename = "Rule-based.png";

    wr.Position_Add();

    wr.Type_Rule();

    wr.Change_Recommend();

    wr.Type_Userauto();

    filename = "User auto.png";

    wr.GetScreenshot(filepath, filename);

    wr.Change_Recommend();

    wr.Type_Userexternal();

    filename = "User external.png";

    wr.GetScreenshot(filepath, filename);

    wr.Change_Recommend();

    wr.Type_Itemauto();

    filename = "Item auto.png";

    wr.GetScreenshot(filepath, filename);

    wr.Change_Recommend();

    wr.Type_History();

    filename = "Browsing History.png";

    wr.GetScreenshot(filepath, filename);

    wr.Change_Recommend();

    wr.Type_Historyauto();

    filename = "Item auto on browsing History.png";

    wr.GetScreenshot(filepath, filename);

    wr.Change_Recommend();

    wr.Type_Ranking();

    filename = "Ranking.png";

    wr.GetScreenshot(filepath, filename);

    wr.Change_Recommend();

    wr.Type_Reminder();

    filename = "Reminder.png";

    wr.GetScreenshot(filepath, filename);

    wr.Change_Recommend();

    wr.Type_Bav();

    filename = "Buy after viewing.png";

    wr.GetScreenshot(filepath, filename);

    wr.Position_Cancel();

    return;
  }
  /**
   * Same recommendation location name / element ID that can not be registered
   *
   * @throws InterruptedException
   */
  public void Same_PositionName() throws InterruptedException {
    // @TODO: i18n
    String error = "推荐名稱被复制";
    String str = "Same recommend position name";

    wr.Position_Add();

    wr.Type_Rule();

    wr.Edit_Positionname(str);

    wr.Edit_Elementid("abeshi");

    wr.Position_OK();

    // It is too early to become an error
    Thread.sleep(500);

    wr.Position_Add();

    wr.Type_Rule();

    wr.Edit_Positionname(str);

    wr.Edit_Elementid("hidebu");

    wr.Position_OK();

    // It is too early to become an error
    Thread.sleep(500);

    result = wr.String_Check(error);

    // Error string judgment
    if (result != true) {
      System.out.println("TEST FAILED!!\n\n" + StackTrace.calledFrom());
    }

    wr.OK();

    wr.Edit_Positionname("Different recommend position name");

    wr.Edit_Elementid("abeshi");

    wr.Position_OK();

    // It is too early to become an error
    Thread.sleep(500);

    // @TODO: i18n
    error = "元件ID被复制";

    result = wr.String_Check(error);

    // Error string judgment
    if (result != true) {
      System.out.println("TEST FAILED!!\n\n" + StackTrace.calledFrom());
    }

    wr.Position_Cancel();

    return;
  }