@Test(dataProvider = "data")
 public void unattestedCancelFavoriteCars(ITestContext context, Map<String, String> data) {
   FindCarsUnattestedFather.unattestedFindCarsParpare(context, seleniumUtil);
   FindCarsPageHelper.enterPage(seleniumUtil, FindCarsPage.FCP_TAB_FAV);
   FindCarsPageHelper.dismissCancelCarsByLicense(
       seleniumUtil, FindCarsPage.FCP_BUTTON_CFAV, data.get("LICENSE"));
 }
コード例 #2
0
  /** 为找车源模块,未认证用户的登录操作以及相关数据准备 * */
  public static void unattestedFindCarsParpare(ITestContext context, SeleniumUtil seleniumUtil) {
    String configFilePath =
        String.valueOf(context.getCurrentXmlTest().getParameter("userInfoPath"));
    timeOut = Integer.valueOf(context.getCurrentXmlTest().getParameter("timeOut"));
    sleepTime = Integer.valueOf(context.getCurrentXmlTest().getParameter("sleepTime"));
    String unattestedUsername =
        PropertiesDataProvider.getTestData(configFilePath, "unauthusername");
    String unattestedPassword =
        PropertiesDataProvider.getTestData(configFilePath, "unauthpassword");

    HomePageHelper.waitHomePageToLoad(timeOut, seleniumUtil);
    HomePageHelper.enterPage(seleniumUtil, HomePage.HP_BUTTON_LOGIN);
    LoginPageHelper.waitLoginPageToLoad(timeOut, seleniumUtil);
    LoginPageHelper.login(seleniumUtil, unattestedUsername, unattestedPassword);
    LoginPageHelper.checkUserInfo(timeOut, sleepTime, seleniumUtil, unattestedUsername);
    HomePageHelper.enterPage(seleniumUtil, HomePage.HP_LINK_FINDCARS);
    FindCarsPageHelper.waitFindCarsPageToLoad(timeOut, seleniumUtil);
  }