Example #1
0
  @Test(dataProvider = "getData")
  public void topMenuTest(Hashtable<String, String> data) {

    // runmode of the test
    if (!TestUtil.getRunmode("MenuTest", xls))
      throw new SkipException("Skipping Test as Runmode is NO");

    // runmode of data set
    if (data.get("Runmode").equals("N")) throw new SkipException("Skipping as flag is N");

    /*Keywords session = Keywords.getInstance();
    session.openBrowser(data.get("Browser"));
    session.navigate("testSiteURL");
    //Assert.assertTrue(session.isElementPresent("solutionsTab"), "Solutions tab not present ");
    session.click("solutionsTab");
    //
    session.navigate("testSiteURL");
    //Assert.assertTrue(session.isElementPresent("prodTab"), "Product tab not present ");
    session.click("prodTab");
    session.navigate("testSiteURL");
    //Assert.assertTrue(session.isElementPresent("servicesTab"), "Services tab not present ");
    session.click("servicesTab");

     */

    k.executeKeywords("MenuTest", xls, data);
  }
 // check if the suite execution has to be skipped or not
 @BeforeSuite
 public void checkSuiteSkip() throws IOException {
   initialize();
   APP_LOGS.debug("Checking Run mode of Suite C");
   if (!TestUtil.isSuiteRunnable(suiteXls, "C Suite")) {
     APP_LOGS.debug("Skipped because run mode was set to NO");
     throw new SkipException("Runmode of Suite C set to no. So Skipping al test in Suite C");
   }
 }
Example #3
0
  @DataProvider
  public Object[][] getData() {
    return TestUtil.getData("MenuTest", xls);

    /*Object data[][] = new Object[2][1];
    data[0][0]="Mozilla";
    data[1][0]="Chrome";
    return data;
    */
  }
 @BeforeTest
 public void checkTestSkip() {
   if (!TestUtil.isTestCaseRunnable(suiteCXls, this.getClass().getSimpleName())) {
     APP_LOGS.debug(
         "Skipping testcase as test"
             + this.getClass().getSimpleName()
             + " case runmode set to no in test case"); // logs
     throw new SkipException("Test Case skipped as runmode set to no"); // reports
   }
 }