public void BTA_03_LN_Program_eCollateral_ValidaitonsBonus() { #region Object Declaration testCase = new TestCase(TestContext.TestName); listOfTestSteps = new List <TestStep>(); testStep = new TestStep(); var bonusData = new NonAdminUserData(driverContext); CategoryFields bonus = new CategoryFields(); ProjectBasePage basePages = new ProjectBasePage(driverContext); var application_Nav_Util_Page = new Application_Nav_Util_Page(DriverContext); var navigator_Users_ProgramPage = new Navigator_Users_ProgramPage(DriverContext); var navigator_Users_Program_ComponentsPage = new Navigator_Users_Program_ComponentsPage(DriverContext); var navigator_Users_Program_eCollateralPage = new Navigator_Users_Program_eCollateralPage(DriverContext); var navigator_CreateBonus_Category = new Navigator_Users_Program_Components_CategoriesPage(DriverContext); var navigator_CreateBonus = new Navigator_Users_Program_eCollateral_BonusesPage(DriverContext); string stepOutput = ""; string stepName = ""; #endregion try { #region Object Initialization var common = new Common(DriverContext); bonus.CategoryName = bonusData.BonusCategoryName; var date = DateTime.Now; bonus.StartDate = DateTime.Now.ToString("MM/dd/yyyy HH:mm:ss", new CultureInfo("en-US")); bonus.ExpiryDate = date.AddYears(10).ToString("MM/dd/yyyy HH:mm:ss", new CultureInfo("en-US")); bonus.Logo_Img_Hero = "null"; bonus.CategoryTypeValue = CategoryFields.CategoryType.Bonus.ToString(); bonus.ValueToSetInAttribute = "ValueGivenForAttribute"; bonus.SetType = CategoryFields.Property.Name.ToString(); var organizationsPage = new Navigator_Admin_OrganizationsPage(DriverContext); bonus.MultiLanguage = CategoryFields.Languages.English.ToString(); bonus.ChannelProperties = CategoryFields.Channel.Web.ToString(); #endregion #region Step1:Launch Navigator Portal stepName = "Launch Navigator URL"; testStep = TestStepHelper.StartTestStep(testStep); var navigator_LoginPage = new Navigator_LoginPage(DriverContext); navigator_LoginPage.LaunchNavigatorPortal(login.Url, out string LaunchMessage); testStep.SetOutput(LaunchMessage); testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("WEB")); listOfTestSteps.Add(testStep); #endregion #region Step2:Login As User Admin User stepName = "Login As User Admin User and Navigate to Home page by selecting Organization and Environment"; testStep = TestStepHelper.StartTestStep(testStep); login.UserName = NavigatorUsers.NonAdminUser; login.Password = NavigatorUsers.NavigatorPassword; navigator_LoginPage.Login(login, Users.AdminRole.USER.ToString(), out string stroutput); testStep.SetOutput(stroutput); var navigator_UsersHomePage = new Navigator_UsersHomePage(DriverContext); navigator_UsersHomePage.Navigator_Users_SelectOrganizationEnvironment(); testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("WEB")); listOfTestSteps.Add(testStep); #endregion #region Step3:Create New Category with Bonus stepName = "Create new Category as " + bonus.CategoryName; testStep = TestStepHelper.StartTestStep(testStep); application_Nav_Util_Page.OpenApplication(NavigatorEnums.ApplicationName.program); navigator_Users_ProgramPage.NavigateToProgramTab(Navigator_Users_ProgramPage.ProgramTabs.Components); navigator_Users_Program_ComponentsPage.NavigateToProgramComponentsTab(Navigator_Users_Program_ComponentsPage.ComponentsTabs.Categories); testStep.SetOutput(navigator_CreateBonus_Category.CreateCategory(bonus)); testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("WEB")); listOfTestSteps.Add(testStep); #endregion #region Step4: Verify Error Message if Bonus Name is Empty stepName = "Verify Error Message if Bonus Name is Empty"; testStep = TestStepHelper.StartTestStep(testStep); navigator_Users_ProgramPage.NavigateToProgramTab(Navigator_Users_ProgramPage.ProgramTabs.eCollateral); navigator_Users_Program_eCollateralPage.NavigateToProgramECollateralTab(Navigator_Users_Program_eCollateralPage.eCollateralTabs.Bonuses); testStep.SetOutput(navigator_CreateBonus.VerifyErrorMessageForEmptyName()); testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("WEB")); listOfTestSteps.Add(testStep); #endregion //#region Step5: Verify Error Message if Bonus Name is more than 100 Charecters //stepName = "Verify Error Message if User Name Name is more than 100 Charecters"; //testStep = TestStepHelper.StartTestStep(testStep); //bonus.Name = organizationsPage.RandomAlphanumericString(new System.Random().Next(101, 105)); //navigator_CreateBonus.ValidateBonusName(bonus, out string message).ToString(); //testStep.SetOutput(message); //testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("WEB")); //listOfTestSteps.Add(testStep); //#endregion #region Step6: Logout stepName = "Logout from USER page"; testStep = TestStepHelper.StartTestStep(testStep); navigator_LoginPage.Logout(); testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("WEB")); listOfTestSteps.Add(testStep); #endregion testCase.SetStatus(true); } catch (Exception e) { testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, false, DriverContext.SendScreenshotImageContent("WEB")); listOfTestSteps.Add(testStep); testCase.SetStatus(false); testCase.SetErrorMessage(e.Message); testCase.SetImageContent(DriverContext.TakeScreenshot().ToString()); Assert.Fail(); } finally { testCase.SetTestCaseSteps(listOfTestSteps); testCase.SetEndTime(new StringHelper().GetFormattedDateTimeNow()); listOfTestCases.Add(testCase); } }
public void BTA80_Navigator_CreateOrganizationsAndEnvironments() { testStep = new TestStep(); MethodBase method = MethodBase.GetCurrentMethod(); string methodName = method.Name; testCase = new TestCase(methodName); listOfTestSteps = new List <TestStep>(); testStep = new TestStep(); string stepName = ""; try { #region OrderExecution Requirement string Prereq_testCase = "BTA79_Navigator_CreateAdminUser_And_Login_With_AdminUser"; ProjectBasePage.VerifyOrderTest(OrderTest_Status, Prereq_testCase, methodName, testStep); #endregion #region Object Initialization var navigator_LoginPage = new Navigator_LoginPage(DriverContext); var navigator_AdminPage = new Navigator_Admin_UsersPage(DriverContext); var organizationsPage = new Navigator_Admin_OrganizationsPage(DriverContext); #endregion #region Step1 : Open Navigator URL stepName = "Open Navigator URL"; testStep = TestStepHelper.StartTestStep(testStep); navigator_LoginPage.LaunchNavigatorPortal(login.Url, out string LaunchMessage); testStep.SetOutput(LaunchMessage); testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("WEB")); listOfTestSteps.Add(testStep); #endregion #region Step2 : Login to Navigator using BTAADMIN stepName = "Login to Navigator using BTAADMIN"; testStep = TestStepHelper.StartTestStep(testStep); login.UserName = NavigatorUsers.AdminUser; login.Password = NavigatorUsers.AdminUser_Password; navigator_LoginPage.Login(login, Users.AdminRole.LWADM.ToString(), out string stroutput); testStep.SetOutput(stroutput); testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("WEB")); listOfTestSteps.Add(testStep); #endregion #region Step3 : Navigate to Organization page var application_Nav_Util_Page = new Application_Nav_Util_Page(driverContext); application_Nav_Util_Page.OpenApplication(NavigatorEnums.ApplicationName.organization); #endregion #region Step4 : Create Organization with default development envionment if Organization does not exists stepName = "Create Organization with default development envionment if it does not exists"; testStep = TestStepHelper.StartTestStep(testStep); var orgName = ProjectBasePage.Orgnization_value; organizationsPage.CreateOrganization(orgName, out string outStatus); testStep.SetOutput(outStatus); testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("WEB")); listOfTestSteps.Add(testStep); #endregion #region Step5 : Create QA envionment if it does not exists stepName = "Create QA envionment if it does not exists"; testStep = TestStepHelper.StartTestStep(testStep); application_Nav_Util_Page.OpenApplication(NavigatorEnums.ApplicationName.organization); organizationsPage.CreateQAEnvironment(orgName, out outStatus); testStep.SetOutput(outStatus); testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("WEB")); listOfTestSteps.Add(testStep); #endregion #region Step6 : Logout from BTAADMIN stepName = "Logout from BTAADMIN"; testStep = TestStepHelper.StartTestStep(testStep); navigator_LoginPage.Logout(); testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("WEB")); listOfTestSteps.Add(testStep); #endregion testCase.SetStatus(true); ProjectBasePage.UpdateTestcaseStatus(method.Name.ToString(), "Passed"); } catch (Exception e) { ProjectBasePage.UpdateTestcaseStatus(method.Name.ToString(), "Failed"); testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, false, DriverContext.SendScreenshotImageContent("WEB")); listOfTestSteps.Add(testStep); testCase.SetStatus(false); testCase.SetErrorMessage(e.Message); if (!OrderTest_Status.Contains("true")) { Assert.Fail(); testCase.SetImageContent(DriverContext.TakeScreenshot().ToString()); } } finally { testCase.SetTestCaseSteps(listOfTestSteps); testCase.SetEndTime(new StringHelper().GetFormattedDateTimeNow()); listOfTestCases.Add(testCase); } }
public void BTA_226_LN_UpdatedDefaultCurrencyInConfigFile_And_VerifySearchFunctionalityForDifferentValuesInExchangeRates() { #region Object Initialization CategoryFields coupon = new CategoryFields(); Migration Migration = new Migration(driverContext); ProjectBasePage basePages = new ProjectBasePage(driverContext); var application_Nav_Util_Page = new Application_Nav_Util_Page(DriverContext); var navigator_Users_ProgramPage = new Navigator_Users_ProgramPage(DriverContext); var Program_RewardCatalogPage = new Navigator_Users_Program_RewardCatalogPage(DriverContext); var RewardCatalog_ExchangeRatePage = new Navigator_Users_Program_RewardCatalog_ExchangeRatesPage(DriverContext); var manageOrganizationPage = new Navigator_Orgnizations_FrameworkConfigurationPage(DriverContext); var organizationPage = new Navigator_Admin_OrganizationsPage(driverContext); string configPath = BnPBaseFramework.Web.Helpers.FilesHelper.GetFolder(BaseConfiguration.DownloadFolder, Directory.GetCurrentDirectory()); string FrameworkCfgFile = basePages.ConfigDownloadPath + @"\Framework.cfg"; basePages.DeleteExistedFile(FrameworkCfgFile); testCase = new TestCase(TestContext.TestName); listOfTestSteps = new List <TestStep>(); testStep = new TestStep(); string stepName = ""; CategoryFields rate = new CategoryFields(); #endregion try { #region Step1: Launch Navigator Portal stepName = "Launch Navigator URL"; testStep = TestStepHelper.StartTestStep(testStep); var navigator_LoginPage = new Navigator_LoginPage(DriverContext); navigator_LoginPage.LaunchNavigatorPortal(login.Url, out string LaunchMessage); testStep.SetOutput(LaunchMessage); testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("WEB")); listOfTestSteps.Add(testStep); #endregion #region Step2: Login As User Admin User stepName = "Login As User Admin User and Navigate to Home page by selecting Organization and Environment"; testStep = TestStepHelper.StartTestStep(testStep); login.UserName = NavigatorUsers.NonAdminUser; login.Password = NavigatorUsers.NavigatorPassword; navigator_LoginPage.Login(login, Users.AdminRole.USER.ToString(), out string stroutput); testStep.SetOutput(stroutput); var navigator_UsersHomePage = new Navigator_UsersHomePage(DriverContext); navigator_UsersHomePage.Navigator_Users_SelectOrganizationEnvironment(); testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("WEB")); listOfTestSteps.Add(testStep); #endregion #region Step3: Navigate to organization page stepName = "Navigate to organization page"; testStep = TestStepHelper.StartTestStep(testStep); application_Nav_Util_Page.OpenApplication(NavigatorEnums.ApplicationName.organization); testStep.SetOutput("Successfully navigated to Organization page"); testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("WEB")); listOfTestSteps.Add(testStep); #endregion #region Step4: Navigate to Framework Configuration tab stepName = "Select Organization and Environment"; testStep = TestStepHelper.StartTestStep(testStep); organizationPage.NavigateToOrganizationsTabs(Navigator_Admin_OrganizationsPage.OrganizationsTabs.FrameworkConfiguration, out string Message); testStep.SetOutput(Message + ";" + Message); testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("WEB")); listOfTestSteps.Add(testStep); #endregion #region Step5: Set a value to the Default Currency in the framework configuration stepName = "Set a value to the Default Currency in the framework configuration"; testStep = TestStepHelper.StartTestStep(testStep); manageOrganizationPage.EditDefaultCurrencyValueInFrameworkConfiguration(FrameworkCfgFile, rate.ExchangeRateValue, out string Status); testStep.SetOutput(Status); testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("WEB")); listOfTestSteps.Add(testStep); #endregion #region Step6: Verify that the Program Based Currency is displayed in the Rates page stepName = "Verify ProgramBaseCurrency Value in Exchange Rates Page is displaying Updated Currency Value " + rate.ExchangeRateValue; testStep = TestStepHelper.StartTestStep(testStep); application_Nav_Util_Page.OpenApplication(NavigatorEnums.ApplicationName.program); navigator_Users_ProgramPage.NavigateToProgramTab(Navigator_Users_ProgramPage.ProgramTabs.RewardCatalog); Program_RewardCatalogPage.NavigateToProgramRewardCatalogTab(Navigator_Users_Program_RewardCatalogPage.RewardCatalogTabs.ExchangeRates); RewardCatalog_ExchangeRatePage.VerifyProgramBaseCurrencyValueIsDisplayingUpdatedCurrencyValue(rate.ExchangeRateValue, out Status); testStep.SetOutput(Status); testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("WEB")); listOfTestSteps.Add(testStep); #endregion #region Step7: Verify that the search functionality works for To Currency Name stepName = "Verify that the search functionality works for To Currency Name"; testStep = TestStepHelper.StartTestStep(testStep); RewardCatalog_ExchangeRatePage.SearchExchangeRateBasedOnEqualToPredicateValue(CategoryFields.ExchangeRatePropertyType.ToCurrencyName.ToString(), CategoryFields.Predicates.Eq.ToString(), rate.ToCurrencyName); testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("WEB")); listOfTestSteps.Add(testStep); #endregion #region Step8: Verify that the search functionality works for To Currency stepName = "Verify that the search functionality works for To Currency"; testStep = TestStepHelper.StartTestStep(testStep); RewardCatalog_ExchangeRatePage.SearchExchangeRateBasedOnEqualToPredicateValue(CategoryFields.ExchangeRatePropertyType.ToCurrency.ToString(), CategoryFields.Predicates.Eq.ToString(), rate.ExchangeRateValue); testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("WEB")); listOfTestSteps.Add(testStep); #endregion #region Step9: Verify that the search functionality works for From Currency Name stepName = "Verify that the search functionality works for From Currency Name"; testStep = TestStepHelper.StartTestStep(testStep); RewardCatalog_ExchangeRatePage.SearchExchangeRateBasedOnEqualToPredicateValue(CategoryFields.ExchangeRatePropertyType.FromCurrencyName.ToString(), CategoryFields.Predicates.Eq.ToString(), rate.FromCurrencyName); testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("WEB")); listOfTestSteps.Add(testStep); #endregion #region Step10: Verify that the search functionality works for From Currency stepName = "Verify that the search functionality works for From Currency"; testStep = TestStepHelper.StartTestStep(testStep); var result = RewardCatalog_ExchangeRatePage.SearchExchangeRateBasedOnEqualToPredicateValue(CategoryFields.ExchangeRatePropertyType.FromCurrency.ToString(), CategoryFields.Predicates.Eq.ToString(), rate.ExchangeRateValue); testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, result, DriverContext.SendScreenshotImageContent("WEB")); listOfTestSteps.Add(testStep); #endregion #region Step11: Navigate to Framework Configuration tab stepName = "Select Organization and Environment"; testStep = TestStepHelper.StartTestStep(testStep); application_Nav_Util_Page.OpenApplication(NavigatorEnums.ApplicationName.organization); organizationPage.NavigateToOrganizationsTabs(Navigator_Admin_OrganizationsPage.OrganizationsTabs.FrameworkConfiguration, out Message); testStep.SetOutput(Message + ";" + Message); testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("WEB")); listOfTestSteps.Add(testStep); #endregion #region Step12: Revert the customized changes done for Default Currency in the framework configuration and verify the updated value stepName = "Revert the customized changes done for Default Currency in the framework configuration and verify the updated value as " + rate.DefaultCurrencyValue; testStep = TestStepHelper.StartTestStep(testStep); testStep.SetOutput(manageOrganizationPage.EditDefaultCurrencyValueInFrameworkConfiguration(FrameworkCfgFile, rate.DefaultCurrencyValue, out Status)); testStep.SetOutput(Status); testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("WEB")); listOfTestSteps.Add(testStep); #endregion #region Step13: Verify that the Program Based Currency is updated to default Currency Value in the Rates page stepName = "Verify ProgramBaseCurrency Value in Exchange Rates Page is displaying Updated Currency Value " + rate.ExchangeRateValue; testStep = TestStepHelper.StartTestStep(testStep); application_Nav_Util_Page.OpenApplication(NavigatorEnums.ApplicationName.program); navigator_Users_ProgramPage.NavigateToProgramTab(Navigator_Users_ProgramPage.ProgramTabs.RewardCatalog); Program_RewardCatalogPage.NavigateToProgramRewardCatalogTab(Navigator_Users_Program_RewardCatalogPage.RewardCatalogTabs.ExchangeRates); RewardCatalog_ExchangeRatePage.VerifyProgramBaseCurrencyValueIsDisplayingUpdatedCurrencyValue(rate.DefaultCurrencyValue, out Status); testStep.SetOutput(Status); testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("WEB")); listOfTestSteps.Add(testStep); #endregion #region Step10: Logout stepName = "Logout from USER page"; testStep = TestStepHelper.StartTestStep(testStep); navigator_LoginPage.Logout(); testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("WEB")); listOfTestSteps.Add(testStep); #endregion testCase.SetStatus(true); } catch (Exception e) { testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName + e, false, DriverContext.SendScreenshotImageContent("WEB")); listOfTestSteps.Add(testStep); testCase.SetStatus(false); testCase.SetErrorMessage(e.Message); testCase.SetImageContent(DriverContext.TakeScreenshot().ToString()); Assert.Fail(); } finally { testCase.SetTestCaseSteps(listOfTestSteps); testCase.SetEndTime(new StringHelper().GetFormattedDateTimeNow()); listOfTestCases.Add(testCase); } }
public void BTA83_Navigator_GenerateFrameworkCfgFile() { #region Object declaration string configPath = BnPBaseFramework.Web.Helpers.FilesHelper.GetFolder(BaseConfiguration.DownloadFolder, Directory.GetCurrentDirectory()); ProjectBasePage basePages = new ProjectBasePage(driverContext); string FrameworkCfgFile = basePages.ConfigDownloadPath + @"\Framework.cfg"; basePages.DeleteExistedFile(FrameworkCfgFile); testStep = new TestStep(); MethodBase method = MethodBase.GetCurrentMethod(); string methodName = method.Name; testCase = new TestCase(methodName); listOfTestSteps = new List <TestStep>(); testStep = new TestStep(); string stepName = ""; string stepOutput = ""; #endregion try { #region OrderExection Requirement string Prereq_testCase = "BTA79_Navigator_CreateAdminUser_And_Login_With_AdminUser"; ProjectBasePage.VerifyOrderTest(OrderTest_Status, Prereq_testCase, methodName, testStep); #endregion #region Object initilization var loginPage = new Navigator_LoginPage(DriverContext); var manageOrganizationPage = new Navigator_Orgnizations_FrameworkConfigurationPage(DriverContext); var application_Nav_Util_Page = new Application_Nav_Util_Page(driverContext); var organizationPage = new Navigator_Admin_OrganizationsPage(driverContext); #endregion #region Step1: Open Navigator URL stepName = "Open Navigator URL"; testStep = TestStepHelper.StartTestStep(testStep); loginPage.LaunchNavigatorPortal(login.Url, out string LaunchMessage); testStep.SetOutput(LaunchMessage); testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("WEB")); listOfTestSteps.Add(testStep); #endregion #region Step2: Login to navigator using ADMIN stepName = "Login to navigator using ADMIN"; testStep = TestStepHelper.StartTestStep(testStep); login.UserName = NavigatorUsers.AdminUser; login.Password = NavigatorUsers.NavigatorPassword; loginPage.Login(login, Users.AdminRole.LWADM.ToString(), out string stroutput); testStep.SetOutput(stroutput); testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("WEB")); listOfTestSteps.Add(testStep); #endregion #region Step3: Navigate to organization page stepName = "Navigate to organization page"; testStep = TestStepHelper.StartTestStep(testStep); application_Nav_Util_Page.OpenApplication(NavigatorEnums.ApplicationName.organization); testStep.SetOutput("Successfully navigated to Organization page"); testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("WEB")); listOfTestSteps.Add(testStep); #endregion #region Step4: Select Organization and Environment stepName = "Select Organization and Environment"; testStep = TestStepHelper.StartTestStep(testStep); manageOrganizationPage.DrillDownOrg(out string Message); manageOrganizationPage.SelectEnvironment(out string Message1); testStep.SetOutput(Message + ";" + Message1); testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("WEB")); listOfTestSteps.Add(testStep); #endregion #region Step5:Navigate to Framework Configuration tab stepName = "Select Organization and Environment"; testStep = TestStepHelper.StartTestStep(testStep); organizationPage.NavigateToOrganizationsTabs(Navigator_Admin_OrganizationsPage.OrganizationsTabs.FrameworkConfiguration, out Message); testStep.SetOutput(Message + ";" + Message); testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("WEB")); listOfTestSteps.Add(testStep); #endregion #region Step6: Update changes to the framework configuration page and file stepName = "Update changes to the framework configuration page and file"; testStep = TestStepHelper.StartTestStep(testStep); manageOrganizationPage.ExportFrameworkCfgFile(FrameworkCfgFile); testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("WEB")); listOfTestSteps.Add(testStep); #endregion #region Step7: Copy framework configuration file to configuration path stepName = "Copy framework configuration file to configuration path"; testStep = TestStepHelper.StartTestStep(testStep); basePages.CreateOrVerfiyConfigFolder(); File.Copy(FrameworkCfgFile, basePages.ConfigUploadPath + @"\Framework.cfg", true); basePages.VerifyExistedorDownloadedFile(basePages.ConfigUploadPath + @"\Framework.cfg", "Framework.cfg File uploaded Successfully in config path:" + basePages.ConfigUploadPath, out stepOutput); testStep.SetOutput(stepOutput); testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("WEB")); listOfTestSteps.Add(testStep); #endregion #region Step8:Logout from USER page stepName = "Logout from USER page"; testStep = TestStepHelper.StartTestStep(testStep); loginPage.Logout(); testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("WEB")); listOfTestSteps.Add(testStep); #endregion testCase.SetStatus(true); ProjectBasePage.UpdateTestcaseStatus(method.Name.ToString(), "Passed"); } catch (Exception e) { ProjectBasePage.UpdateTestcaseStatus(method.Name.ToString(), "Failed"); testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, false, DriverContext.SendScreenshotImageContent("WEB")); listOfTestSteps.Add(testStep); testCase.SetStatus(false); testCase.SetErrorMessage(e.Message); if (!OrderTest_Status.Contains("true")) { Assert.Fail(); testCase.SetImageContent(DriverContext.TakeScreenshot().ToString()); } } finally { testCase.SetTestCaseSteps(listOfTestSteps); testCase.SetEndTime(new StringHelper().GetFormattedDateTimeNow()); listOfTestCases.Add(testCase); } }