@Test( dataProvider = "Valid_edit", dataProviderClass = Dataprovider_invoice.DataProvider_edit.class, groups = {"invoice"}) public void Valid_edit( String TC_ID, String Order, String invoice_name, String desp, String Exp_Res) throws IOException { String uname = c1.Reading_Properties("uname"); String pwd = c1.Reading_Properties("pwd"); log.info("Executing the testcase " + TC_ID + " Order of " + Order); // System.out.println("hi"); initBrowsersession1(); Pageobject_edit lpob = new Pageobject_edit(browser); lpob.Commonprocessinvoice(uname, pwd, TC_ID, invoice_name, desp); // , Pwd); String Actual_Res = lpob.Valid_edit(); sAssert.assertEquals(Exp_Res, Actual_Res); if (Actual_Res.equals(Exp_Res)) { log.info("Passed as Expected msg was Valid"); } else { log.info("Failed as Expected msg was " + Exp_Res + "Actual msg was " + Actual_Res); sAssert.fail("Failed as Expected msg was " + Exp_Res + "Actual msg was " + Actual_Res); } tearDown(); sAssert.assertAll(); log.info("******************************************"); }
@Test( dataProvider = "Invalid_delete_blnk", dataProviderClass = Dataprovider_item_cat.DataProvider_del.class, groups = {"branch"}) public void Invalid_delete_blnk(String TC_ID, String Order, String Exp_Res) throws IOException { String uname = c1.Reading_Properties("uname"); String pwd = c1.Reading_Properties("pwd"); int j = (int) Double.parseDouble(Order); for (int i = 0; i < j; i++) { // System.out.println(j); log.info("Executing the testcase " + TC_ID + " Order of " + Order); initBrowsersession1(); Pageobject_del lpob = new Pageobject_del(browser); lpob.Commonprocess_item_cat_del(uname, pwd); // ,curr_name);//, Pwd); String Actual_Res = lpob.Invalid_delete_blnk(); sAssert.assertEquals(Exp_Res, Actual_Res); if (Actual_Res.equals(Exp_Res)) { log.info("Passed as Expected msg was Valid"); } else { log.info("Failed as Expected msg was " + Exp_Res + "Actual msg was " + Actual_Res); sAssert.fail("Failed as Expected msg was " + Exp_Res + "Actual msg was " + Actual_Res); } tearDown(); sAssert.assertAll(); log.info("******************************************"); } }
@Test( dataProvider = "Valid_mul_item_cat_del", dataProviderClass = Dataprovider_item_cat.DataProvider_del.class, groups = {"branch"}) public void Valid_mul_item_cat_del(String TC_ID, String Order, String Exp_Res) throws IOException, InterruptedException { String uname = c1.Reading_Properties("uname"); String pwd = c1.Reading_Properties("pwd"); log.info("Executing the testcase " + TC_ID + " Order of " + Order); // System.out.println("hi"); initBrowsersession1(); Pageobject_del lpob = new Pageobject_del(browser); lpob.Commonprocess_item_cat_del(uname, pwd); String Actual_Res = lpob.Valid_mul_item_cat_del(); sAssert.assertEquals(Exp_Res, Actual_Res); if (Actual_Res.equals(Exp_Res)) { log.info("Passed as Expected msg was Valid"); } else { log.info("Failed as Expected msg was " + Exp_Res + "Actual msg was " + Actual_Res); sAssert.fail("Failed as Expected msg was " + Exp_Res + "Actual msg was " + Actual_Res); } tearDown(); sAssert.assertAll(); log.info("******************************************"); }
@Test( dataProvider = "dp_Invalidskill", dataProviderClass = Dataprovider_Employ_skill.DataProvider_create.class, groups = {"employ_SkillSet"}) public void test_Invalidskill( String TC_ID, String Order, String skill_name, String desp, String Exp_Res) throws IOException { String uname = c1.Reading_Properties("uname"); String pwd = c1.Reading_Properties("pwd"); log.info("Executing the testcase " + TC_ID + " Order of " + Order); // System.out.println("hi"); initBrowsersession1(); Pageobject_create lpob = new Pageobject_create(browser); lpob.Commonprocessskill(uname, pwd, TC_ID, skill_name, desp); // , Pwd); String Actual_Res = lpob.getInvalidskillResult(); sAssert.assertEquals(Exp_Res, Actual_Res); if (Actual_Res.equals(Exp_Res)) { log.info("Passed as Expected msg was Valid"); } else { log.info("Failed as Expected msg was " + Exp_Res + "Actual msg was " + Actual_Res); sAssert.fail("Failed as Expected msg was " + Exp_Res + "Actual msg was " + Actual_Res); } tearDown(); sAssert.assertAll(); log.info("******************************************"); }