public void TC46_VerifyDeleteAPIKey() { UserFunctions userFunctions = new UserFunctions(TestProgressLogger); UserSettingPage userSettingsPage = new UserSettingPage(driver, TestProgressLogger); try { TestProgressLogger.StartTest(); // Login as user -> Create and Delete the API Key userFunctions.LogIn(TestProgressLogger, Const.USER2); Assert.True(userSettingsPage.DeleteAPIKey(driver), LogMessage.DeleteAPIKeyFailureMsg); TestProgressLogger.LogCheckPoint(String.Format(LogMessage.DeleteAPIKeySuccessMsg)); } catch (NoSuchElementException ex) { TestProgressLogger.TakeScreenshot(); TestProgressLogger.LogCheckPoint(ex.Message + ex.StackTrace); TestProgressLogger.LogError(LogMessage.DeleteAPIKeyFailureMsg, ex); throw ex; } catch (Exception e) { TestProgressLogger.TakeScreenshot(); TestProgressLogger.LogCheckPoint(e.Message + e.StackTrace); TestProgressLogger.LogError(LogMessage.DeleteAPIKeyFailureMsg, e); throw e; } finally { TestProgressLogger.EndTest(); } }
public void TC46_VerifyDeleteAPIKey() { UserFunctions userFunctions = new UserFunctions(TestProgressLogger); UserSettingPage userSettingsPage = new UserSettingPage(driver, TestProgressLogger); try { TestProgressLogger.StartTest(); userFunctions.LogIn(TestProgressLogger, Const.USER2); Assert.True(userSettingsPage.DeleteAPIKey(driver), LogMessage.DeleteAPIKeySuccessMsg); TestProgressLogger.LogCheckPoint(String.Format(LogMessage.DeleteAPIKeySuccessMsg)); } catch (Exception e) { TestProgressLogger.TakeScreenshot(); TestProgressLogger.LogError(LogMessage.DeleteAPIKeyFailureMsg, e); throw e; } finally { TestProgressLogger.EndTest(); UserFunctions userFunctionality = new UserFunctions(TestProgressLogger); userFunctionality.LogOut(); } }
public void VerifyDeleteAPIKey() { driver.Navigate().GoToUrl("https://apexwebqa.azurewebsites.net/exchange"); driver.Manage().Window.Maximize(); driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(5); //Login as a User say XYZ UserFunctions objUserFunctionality = new UserFunctions(output); objUserFunctionality.LogIn(); UserSettingPage usp = new UserSettingPage(driver, output); Assert.True(usp.DeleteAPIKey(driver)); }