/**
   * To delete summarizes the rules However, it is only to remove argument minute passed from the
   * last page
   *
   * @param number The number you want to delete
   * @throws InterruptedException
   */
  public void Delete_Position(int number) throws InterruptedException {
    List<WebElement> elms;
    int set = 0;

    wr.Last();

    wr.Loading();

    // Until the number of deletion is zero
    while (0 < number) {
      // get the number of display of check box
      elms = wr.Wait_Elements("x-grid-row-checker", Element_Type.CLASS);

      set = elms.size();

      if (set == 0) {
        break;
      }

      while (true) {
        // Break When you reach up to the number you want to or delete all checked
        if (set == 0 || number == 0) {
          break;
        }

        wr.Check_Box(set);

        set--;
        number--;
      }

      wr.Delete();

      wr.Delete_OK();

      // Up to the number you want to delete you did not reach the last page
      if (set == 0 && number != 0) {
        Thread.sleep(200);

        wr.Last();
      }
    }

    return;
  }
  /**
   * The maximum number of registrations is consistent with the maximum number of subscriber
   * information. That you can not register any more
   *
   * @throws InterruptedException
   */
  public void PositionSet_Max() throws InterruptedException {
    int count = 0;
    String elementid;
    String str = null;

    while (true) {
      result = wr.Position_Add();

      elementid = "a";

      if (result == false) {
        break;
      }

      str = Integer.toString(count);

      elementid = elementid + str;

      wr.Type_Rule();

      wr.Edit_Positionname(str);

      wr.Edit_Elementid(elementid);

      wr.Position_OK();
      // if no that there is a case in which for some reason you would click on the header part
      Thread.sleep(200);

      count++;
    }

    // The maximum number of registered check
    wr.Get_MaxNumber();

    return;
  }
  /**
   * All test run
   *
   * @throws InterruptedException
   */
  public void Excution() throws InterruptedException {
    Thread.sleep(500);
    Position_TEST();

    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;
  }