/**
   * 测试名称:08 数据自动刷新 [前提条件]: [测试步骤]: 1、进入【选股】->【股票池】->【涨停尖兵】 2、查看有庄操作界面数据刷新时间 [预期结果]: 1、数据每隔15秒自动刷新
   */
  @Test(dependsOnGroups = "stock time")
  public void testYZshujushuaxin() {

    up.goHomePage();
    up.verifyIsShown("选股");
    up.clickOn("选股");
    up.verifyIsShown("短线狙击");
    up.clickOn("短线狙击");
    up.verifyIsShown("有庄操盘");
    up.waitByTimeout(5000);
    if (up.isElementShown("暂无相关数据")) {
      up.log("短线狙击中有庄操盘无数据,测试正常退出.");
    } else {

      Double temp = 50.0;
      double price = 0;
      double newPrice = 0;
      for (int i = 0; i < up.getElementsSize("股票名称"); i++) {
        String value = up.getValueOf("股票当日涨幅1", i);
        if (value.contains(".")) temp = Double.valueOf(value.split("%")[0]);
        if (temp < 9.9) {
          price = temp;
          up.log("等待15秒");
          up.waitByTimeout(16000);

          newPrice = Double.valueOf(up.getValueOf("股票当日涨幅1", i).split("%")[0]);
          if (price == newPrice) throw new RuntimeException("蓄能界面数据在15秒后没有自动刷新.");
        }
      }
    }
  }
  /**
   * 测试名称:02 撤单取消 [前提条件]: 1、撤单列表只有一条数据 2、在交易时间内 [测试步骤]: 1、点击某品种的撤单按钮 2、点击撤单提示对话框的取消按钮
   *
   * <p>[预期结果]: 1、撤单界面数据无任何变化;
   */
  @Test(dependsOnGroups = "Bohai time")
  public void testCeDanQuXiao() {

    up.goHomePage();
    up.verifyIsShown("自选");
    up.goToHeader("渤海交易");
    up.login_BH();
    up.clickOn("出价");
    up.sendNum(up.getValueOf("涨停"));
    up.tapOn(9.9, 9.9);
    up.waitByTimeout(1000);
    up.tapOn(9.9, 9.9);
    up.verifyIsShown("卖出");
    up.clickOn("卖出");
    up.clickOn("委托确定1");
    up.clickOn("委托确定2");

    up.clickOn("操作提示");

    up.clickOn("撤单");
    up.verifyIsShown("撤单1");
    up.clickOn("撤单1");
    up.verifyIsShown("取消");
    up.clickOn("取消");
    up.verifyIsShown("标题");
    up.cheDan();
  }