public void P20_1_tc_57035_Bundle_Access_Key() { #region Create a general course CommonSection.CreateGeneralCourse(GeneralCourseTitle + "_TC57035"); DocumentPage.ClickButton_CheckIn(); #endregion CommonSection.CreateLink.Bundle(); _test.Log(Status.Info, "Click create>Subscriptions"); CreatebundlePage.CreateBundle("Content Bundle", bunbdleTitle + "TC57035", "Bundle Price"); _test.Log(Status.Info, "Create a new Content Bundle"); AdminContentDetailsPage.AddContentToBundle(GeneralCourseTitle + "_TC57035"); AdminContentDetailsPage.AddCost(); ContentDetailsPage.ClickEditContent_New19_2(); ContentDetailsPage.Accordians.ClickEdit_AccessKey(); AccessKeysPage.EnableAccessKey("Yes").Save(); DocumentPage.ClickButton_CheckIn(); //Driver.CreateNewAccount(); // _test.Log(Status.Info, "Create new user account"); LoginPage.LoginAs("srlearner105").WithPassword("").Login(); CommonSection.SearchCatalog(bunbdleTitle + "TC57035"); SearchResultsPage.ClickCourseTitle(bunbdleTitle + "TC57035"); Assert.IsTrue(ContentDetailsPage.OverviewTab.isAddtoCartbuttondisplay()); ContentDetailsPage.OverviewTab.click_AddtoCart(); CommonSection.Completepurchage(bunbdleTitle + "TC57035"); Assert.IsTrue(ContentDetailsPage.ContentBanner.isStartbuttonDisplay()); ContentDetailsPage.ContentBanner.Click_Startbutton(); Assert.IsTrue(ContentDetailsPage.isContentTabSelected()); Assert.IsTrue(ContentDetailsPage.isHistoryTabDisplay_GeneralCourse()); ContentDetailsPage.Click_HistoryTab_Curriculum(); Assert.IsTrue(ContentDetailsPage.HistoryTab.VerifyEnrolledinSectionwithAccessKey()); TC57459_2 = true; }
public void A11_Access_Key_Expire_When_User_Completed_the_Content_Bundle_34189() { #region Create General Course and Bundle With Cost and Access keys Enabled CommonSection.CreateLink.GeneralCourse(); _test.Log(Status.Info, "Creating a Paid General Course"); GeneralCoursePage.CreateGeneralCourse(generalcourse + "TC34189", "Test General Course"); GeneralCoursePage.setCost("5"); DocumentPage.ClickButton_CheckIn(); _test.Log(Status.Info, "Paid general course created"); CommonSection.Learn.Home(); CommonSection.CreateLink.Bundle(); _test.Log(Status.Info, "Creating a Paid Bundle Course with Access Keys"); objCreate.FillBundlePage(browserstr + "TC34189"); GeneralCoursePage.setCost("5"); _test.Log(Status.Info, "Cost Has Been Set"); BundlesPage.enableAccessKeys(); _test.Log(Status.Info, "Access Keys Enabled"); BundlesPage.addContentIntoBundle(generalcourse + "TC34189"); _test.Log(Status.Info, "Adding Paid General Course into Bundle"); DocumentPage.ClickButton_CheckIn(); #endregion #region Purchase Access Keys for Bundle ShoppingCarts.purchaseAccessKeys("Bundle", Variables.bundleTitle + browserstr + "TC34189"); ShoppingCarts.completePurchaseProcess(); _test.Log(Status.Info, "Keys has been purchased from shopping cart"); CommonSection.Manage.Training(); CommonSection.Manage.AccessKeys(); AccessKeysPage.searchForContent(Variables.bundleTitle + browserstr + "TC34189"); AccessKeysPage.assignKeysToLearner("*****@*****.**"); _test.Log(Status.Info, "Keys has been assigned to learner"); driver.LogoutUser(ObjectRepository.LogoutHoverLink, ObjectRepository.HoverMainLink); #endregion LoginPage.LoginAs("ssuser1").WithPassword("password").Login(); Assert.IsTrue(BundlesPage.searchforBundle(Variables.bundleTitle + browserstr + "TC34189", generalcourse + "TC34189")); _test.Log(Status.Info, "General Course Displaying inside Bundle, Assertion Pass"); Assert.IsTrue(Driver.Instance.IsElementVisible(By.XPath("//input[@value='Enroll']"))); _test.Log(Status.Info, "Cost of General Course Override, Assertion Pass"); GeneralCoursePage.completeGeneralCourse(); BundlesPage.simplysearchforBundle(Variables.bundleTitle + browserstr + "TC34189"); Assert.IsTrue(Driver.Instance.IsElementVisible(By.XPath("//p[contains(.,'You have already completed this item. You must use another access key to begin a new attempt.')]"))); driver.LogoutUser(ObjectRepository.LogoutHoverLink, ObjectRepository.HoverMainLink); LoginPage.LoginAs("").WithPassword("").Login(); }
public void A16_Test_Access_Keys_with_Curriculum_34153() { #region Create General Course and Curriculum With Cost and Access keys Enabled CommonSection.CreateLink.GeneralCourse(); _test.Log(Status.Info, "Creating a Paid General Course"); GeneralCoursePage.CreateGeneralCourse(generalcourse + "Curr", "Test General Course"); GeneralCoursePage.setCost("5"); DocumentPage.ClickButton_CheckIn(); _test.Log(Status.Info, "Paid general course created"); CommonSection.Learn.Home(); CommonSection.CreateLink.Curriculam(); _test.Log(Status.Info, "Creating a Paid Curriculum Course with Access Keys"); objCreate.FillCurriculumPage("AK", browserstr); GeneralCoursePage.setCost("5"); _test.Log(Status.Info, "Cost Has Been Set"); BundlesPage.enableAccessKeys(); _test.Log(Status.Info, "Access Keys Enabled"); CurriculumsPage.CurriculumContent.addContentIntoCurriculam(generalcourse + "Curr"); _test.Log(Status.Info, "Adding Paid General Course into Curriculum"); DocumentPage.ClickButton_CheckIn(); #endregion #region Purchase Access Keys for Curriculam ShoppingCarts.purchaseAccessKeys("Curriculam", Variables.curriculumTitle + browserstr + "AK"); ShoppingCarts.completePurchaseProcess(); _test.Log(Status.Info, "Keys has been purchased from shopping cart"); CommonSection.Manage.Training(); CommonSection.Manage.AccessKeys(); AccessKeysPage.searchForContent(Variables.curriculumTitle + browserstr + "AK"); AccessKeysPage.assignKeysToLearner("*****@*****.**"); _test.Log(Status.Info, "Keys has been assigned to learner"); driver.LogoutUser(ObjectRepository.LogoutHoverLink, ObjectRepository.HoverMainLink); #endregion LoginPage.LoginAs("ssuser1").WithPassword("password").Login(); Assert.IsTrue(CurriculumsPage.searchforCurriculam(Variables.curriculumTitle + browserstr + "AK", generalcourse + "Curr")); _test.Log(Status.Info, "General Course Displaying inside Curriculuam, Assertion Pass"); Assert.IsTrue(Driver.Instance.IsElementVisible(By.XPath("//input[@value='Enroll']"))); // TC_10823 = true; _test.Log(Status.Info, "Cost of General Course Override, Assertion Pass"); driver.LogoutUser(ObjectRepository.LogoutHoverLink, ObjectRepository.HoverMainLink); LoginPage.LoginAs("").WithPassword("").Login(); }
public void P20_1_tc_56398_User_Views_Access_Key_usage_info_when_enrolling_in_curriculum() { #region Create a general course CommonSection.CreateGeneralCourse(GeneralCourseTitle + "_TC56398"); AdminContentDetailsPage.AddCost(); ContentDetailsPage.ClickEditContent_New19_2(); DocumentPage.ClickButton_CheckIn(); #endregion #region Create a curriculum CommonSection.CreteNewCurriculumn(curriculamtitle + "_TC56398"); _test.Log(Status.Info, "Create A new Curriculum"); ContentDetailsPage.ClickCurriculumContentEditButton(); CurriculumContentPage.ClickAddCurriculumBlock(); CurriculumContentPage.AddCurriculumBlock.AddBlockAs(block + "_UnOrdered" + "_TC56398"); CurriculumContentPage.AddTrainingActivities_UnOrdered(GeneralCourseTitle + "_TC56398"); CurriculumContentPage.ClickBackbutton(); ContentDetailsPage.Accordians.ClickEdit_CostNSalesTax(); CostPage.DefaultCostAs("5").Save(); CostPage.ClickReturn(); ContentDetailsPage.Accordians.ClickEdit_AccessKey(); AccessKeysPage.EnableAccessKey("Yes").Save(); DocumentPage.ClickButton_CheckIn(); #endregion CommonSection.SearchCatalog(curriculamtitle + "_TC51560"); _test.Log(Status.Info, "Enter curriculum title in global search box"); SearchResultsPage.ClickCourseTitle(curriculamtitle + "_TC51560"); _test.Log(Status.Info, "Click on search result from catalog"); Assert.IsTrue(ContentDetailsPage.OverviewTab.isAddtoCartbuttondisplay()); ContentDetailsPage.OverviewTab.click_AddtoCart(); CommonSection.Completepurchage(curriculamtitle + "_TC51560"); Assert.IsTrue(ContentDetailsPage.ContentBanner.isStartbuttonDisplay()); ContentDetailsPage.ContentBanner.Click_Startbutton(); Assert.IsTrue(ContentDetailsPage.isContentTabSelected()); Assert.IsTrue(ContentDetailsPage.isHistoryTabDisplay_GeneralCourse()); ContentDetailsPage.Click_HistoryTab_Curriculum(); Assert.IsTrue(ContentDetailsPage.HistoryTab.VerifyEnrolledinSectionwithAccessKey()); }
public void tc_60021_AICC_Banner_Actions_Access_Keys() { Scorm12 CreateScorm = new Scorm12(driver); CommonSection.CreateLink.AICC(); driver.navigateAICCfile("Data\\mv_mvet_a03_it_enus.au", By.Id("ctl00_MainContent_UC1_rau_aufile0")); driver.navigateAICCfile("Data\\mv_mvet_a03_it_enus.crs", By.Id("ctl00_MainContent_UC1_rau_crsfile0")); driver.navigateAICCfile("Data\\mv_mvet_a03_it_enus.cst", By.Id("ctl00_MainContent_UC1_rau_cstfile0")); driver.navigateAICCfile("Data\\mv_mvet_a03_it_enus.des", By.Id("ctl00_MainContent_UC1_rau_desfile0")); CreateScorm.buttoncreateclick(driver, true); _test.Log(Status.Info, "AICC files are uploaded"); CreateAICCPage.Title(AICCCourseTitle + "TC60021"); EditSummaryPage.ClickSavebutton(); _test.Log(Status.Info, "Create a new AICC Course"); Assert.IsTrue(ContentDetailsPage.IsContentCreated()); AdminContentDetailsPage.AddCost(); ContentDetailsPage.ClickEditContent_New19_2(); ContentDetailsPage.Accordians.ClickEdit_AccessKey(); AccessKeysPage.EnableAccessKey("Yes").Save(); DocumentPage.ClickButton_CheckIn(); //Driver.CreateNewAccount(); // _test.Log(Status.Info, "Create new user account"); CommonSection.Logout(); LoginPage.LoginAs("srlearner105").WithPassword("").Login(); CommonSection.SearchCatalog(AICCCourseTitle + "TC60021"); SearchResultsPage.ClickCourseTitle(AICCCourseTitle + "TC60021"); Assert.IsTrue(ContentDetailsPage.OverviewTab.isAddtoCartbuttondisplay()); ContentDetailsPage.OverviewTab.click_AddtoCart(); CommonSection.Completepurchage(AICCCourseTitle + "TC60021"); Assert.IsTrue(ContentDetailsPage.ContentBanner.isOpenItembuttonDisplay()); ContentDetailsPage.ContentBanner.Click_Enrollbutton(); Assert.IsTrue(ContentDetailsPage.ContentBanner.isStartbuttonDisplay()); }