/**
   * 注册手机账户
   *
   * @param username
   * @param password
   */
  public static void regPhoneFlow(String username, String password) {
    reg_button.click();
    create_username.sendKeys(username);
    con_text.click(); // 因为邮箱自动联动后缀,必须转移下焦点。
    createuser_next.click();

    Utils.sleep(5);
    phone_code.sendKeys(GetResetPasswd.getPhoneCode(username));
    create_password.sendKeys(password);
    create_confirm.click();

    Assertion.assertEquals(true, assertRegPhone(username));
  }
  /**
   * 删除病例
   *
   * @return
   */
  public static boolean deleteCase() {
    WebElement eEditBtn = driver.findElement(By.id(edit_case_btn));
    eEditBtn.click();

    Utils.sleep(5);
    boolean flag = Utils.swipe(driver, By.id(delete_case_btn), 5);
    if (flag) {
      WebElement eDeleteCase = driver.findElement(By.id(delete_case_btn));
      eDeleteCase.click();
    } else {
      Assertion.assertEquals(true, flag, "删除按钮未找到,请检查后再试!");
    }

    boolean deleteCaseContent = Utils.isElementExist(driver, By.id(delete_case_message));
    int num = 0;
    while (deleteCaseContent == false && num < 10) {
      System.out.println(num);
      deleteCaseContent = Utils.isElementExist(driver, By.id(delete_case_message));
      num++;
    }

    return deleteCaseContent;
  }
 @AfterClass
 public void tearDown() {
   driver.quit();
   Utils.sleep(2);
   Utils.setInputMethod();
 }