@Test
  public void testAppCreation() {

    APIMLoginPage apimLoginPage = new APIMLoginPage(getNewDriver(Constants.BROWSER));
    apimLoginPage.openURL();
    apimLoginPage.developerLogin();
    MyAppsPage myAppsPage = apimLoginPage.clickMyApps();
    apimLoginPage.validateMyAppsPage();

    // Creating a new app
    NewAppPage newAppPage = myAppsPage.setUpNewApp();
    String appname = newAppPage.getNewAppName();
    newAppPage.enterAppName(appname);
    newAppPage.enterAppName(appname);
    newAppPage.enterDescription(Constants.APP_DESCRIPTION);
    newAppPage.selectAPI(Constants.SPEECH_TO_TEXT);
    AppPage appPage = newAppPage.submitAppDetails();

    // Navigate to edit app page and add DC API
    EditAppPage editAppPage = appPage.clickEditApp();
    editAppPage.selectAPI(Constants.DEVICE_CAPABILITIES);

    // Validate if Developer is able to view OAuth Redirect URL when DC is
    // selected on the Edit App Page
    editAppPage.validateIsOauthDisplayed();
    flag = true;

    // publish result
    apimLoginPage.publishTestResult();
    newAppPage.publishTestResult();
    editAppPage.publishTestResult();
    appPage.publishTestResult();
  }
 @After
 public void deleteCreatedApp() {
   if (flag) {
     EditAppPage edit = new EditAppPage(getDriver());
     AppPage appPage = edit.clickOrCancel();
     appPage.deleteSandboxApp();
   }
 }