public void WhenICreatedTheUserAsStudent(Table table) { try { bool isWindowPresent = GenericHelper.IsPopUpWindowPresent("Manage Organization"); if (isWindowPresent) { GenericHelper.SelectWindow("Manage Organization"); WebDriver.SwitchTo().DefaultContent(); } else { // WebDriver.Close(); string schoolName = DatabaseTools.GetOrganization(Enumerations.OrgLevelType.School); _organizationManagement.SearchAndSelectOrg(schoolName); } // Purpose: To Create Users _manageUserPage.Createusers(table); } catch (Exception e) { GenericHelper.Logs(e.ToString(), "FAILED"); if (GenericHelper.IsPopUpWindowPresent("Manage Organization")) { GenericHelper.SelectWindow("Manage Organization"); WebDriver.Close(); } GenericDefinitions.ThenIClickedOnTheLogoutLinkToGetLoggedOutFromTheApplication(); throw new Exception(e.ToString()); } }
public void WhenCreateCourseWithDetails(Table table) { try { foreach (var tableRow in table.Rows) { GenericDefinitions.WhenIClickedOnTheCreateNewLink("Create New Courses", "right"); Thread.Sleep(2000); _newCoursPage.CreateCourse(tableRow["Value"]); } } catch (Exception e) { GenericHelper.Logs(e.ToString(), "FAILED"); if (Browser.Equals("FF") || Browser.Equals("IE")) { BackedSelenium.SelectWindow(""); } if (Browser.Equals("GC")) { GenericHelper.SelectDefaultWindow(); } IWebElement clickLogoutLink = WebDriver.FindElement((By.XPath(LogOut))); if (clickLogoutLink.Displayed && clickLogoutLink.Enabled) { WebDriver.SwitchTo().DefaultContent(); new Actions(WebDriver).Click(clickLogoutLink).Perform(); } Thread.Sleep(7000); throw new Exception(e.ToString()); } }
public void CreateClassUsingTemplateOption() { try { GenericHelper.SelectWindow("Create Class"); bool isCreateClassWindowOpened = GenericHelper.WaitUtilWindow("Create Class"); if (isCreateClassWindowOpened) { _objClassCreation.ToCreateClass(); } else { GenericHelper.Logs("'Create Class' pop-up not opened for creation of class using template.", "FAILED"); throw new NoSuchWindowException("'Create Class' pop-up not opened for creation of class using template."); } GenericHelper.SelectWindow("Manage Organization"); } catch (Exception e) { GenericHelper.Logs(e.ToString(), "FAILED"); if (GenericHelper.IsPopUpWindowPresent("Manage Organization")) { GenericHelper.SelectWindow("Manage Organization"); WebDriver.Close(); } GenericDefinitions.ThenIClickedOnTheLogoutLinkToGetLoggedOutFromTheApplication(); throw new Exception(e.ToString()); } }
public void WhenIImportABulkUserSFile() { try { _importUsersPage.ImportUsers(); } catch (Exception e) { GenericHelper.Logs(e.ToString(), "FAILED"); GenericDefinitions.ThenIClickedOnTheLogoutLinkToGetLoggedOutFromTheApplication(); throw new Exception(e.ToString()); } }
public void WhenISelectTheBulkUserUploadOption() { try { _manageUserPage.SelectImportUsers(); } catch (Exception e) { GenericHelper.Logs(e.ToString(), "FAILED"); GenericDefinitions.ThenIClickedOnTheLogoutLinkToGetLoggedOutFromTheApplication(); throw new Exception(e.ToString()); } }
public void ThenItShouldSuccessfullyUploadTheUsers() { try { _manageUserPage.verifyBulkRegistration(); } catch (Exception e) { GenericHelper.Logs(e.ToString(), "FAILED"); GenericDefinitions.ThenIClickedOnTheLogoutLinkToGetLoggedOutFromTheApplication(); throw new Exception(e.ToString()); } }
public void GivenICreatedTheProgram() { try { _programCreatePage.CreateProgram(); } catch (Exception e) { GenericHelper.Logs(e.ToString(), "FAILED"); GenericDefinitions.ThenIClickedOnTheLogoutLinkToGetLoggedOutFromTheApplication(); throw new Exception(e.ToString()); } }
public void WhenICreateTheSchoolProductLicense(string productInstance) { try { _objLicense.CreateLicenses(productInstance); } catch (Exception e) { GenericHelper.Logs(e.ToString(), "FAILED"); GenericDefinitions.ThenIClickedOnTheLogoutLinkToGetLoggedOutFromTheApplication(); throw new Exception(e.ToString()); } }
public void WaitForTemplatefromAssignToCopy() { try { _objTemplate.ToSearchForAssigned(); } catch (Exception e) { GenericHelper.Logs(e.ToString(), "FAILED"); GenericDefinitions.ThenIClickedOnTheLogoutLinkToGetLoggedOutFromTheApplication(); throw new Exception(e.ToString()); } }
public void SelectTheLibrariesTab() { try { _objManageOrg.SelectLibrariesTab(); } catch (Exception e) { GenericHelper.Logs(e.ToString(), "FAILED"); GenericDefinitions.ThenIClickedOnTheLogoutLinkToGetLoggedOutFromTheApplication(); throw new Exception(e.ToString()); } }
public void CreateTheTemplateUsingContainerCourse() { try { _objTemplate.ToSelectAddTemplate(); } catch (Exception e) { GenericHelper.Logs(e.ToString(), "FAILED"); GenericDefinitions.ThenIClickedOnTheLogoutLinkToGetLoggedOutFromTheApplication(); throw new Exception(e.ToString()); } }
public void ThenIWaitToGetOutOfAssignedToCopyState() { try { _objClassCreation.ToSearchForAssigned((Enumerations.ClassType.NovaNETTemplate)); } catch (Exception e) { GenericHelper.Logs(e.ToString(), "FAILED"); GenericDefinitions.ThenIClickedOnTheLogoutLinkToGetLoggedOutFromTheApplication(); throw new Exception(e.ToString()); } }
public void GivenISelectTheSchoolProductInTheRightFrame(string productInstance) { try { _productSearchPage.SearchProductAndOpen(productInstance); } catch (Exception e) { GenericHelper.Logs(e.ToString(), "FAILED"); GenericDefinitions.ThenIClickedOnTheLogoutLinkToGetLoggedOutFromTheApplication(); throw new Exception(e.ToString()); } }
public void ThenISelectAddClassesButton() { try { _objClassCreate.ToselectAddClass(); } catch (Exception e) { GenericHelper.Logs(e.ToString(), "FAILED"); GenericDefinitions.ThenIClickedOnTheLogoutLinkToGetLoggedOutFromTheApplication(); throw new Exception(e.ToString()); } }
public void CloseTheContentWindow() { try { _objcontentLibrary.ClosetheWindow(); } catch (Exception e) { GenericHelper.Logs(e.ToString(), "FAILED"); GenericDefinitions.ThenIClickedOnTheLogoutLinkToGetLoggedOutFromTheApplication(); throw new Exception(e.ToString()); } }
public void WhenIEnterTheClassasTeacher() { try { _objClassCreation.EnterClassAsTeacherToUnhide(); } catch (Exception e) { GenericHelper.Logs(e.ToString(), "FAILED"); GenericDefinitions.ThenIClickedOnTheLogoutLinkToGetLoggedOutFromTheApplication(); throw new Exception(e.ToString()); } }
public void WhenISelectTheCreateCourseOptionInClassesPage() { try { _myClassdefaultPage.ClickCreateCourse(); } catch (Exception e) { GenericHelper.Logs(e.ToString(), "FAILED"); GenericDefinitions.ThenIClickedOnTheLogoutLinkToGetLoggedOutFromTheApplication(); throw new Exception(e.ToString()); } }
public void ThenItShouldShowTheManageProductsPage() { try { _manageProductsPage.NavigateToManageProductsPage(); } catch (Exception e) { GenericHelper.Logs(e.ToString(), "FAILED"); GenericDefinitions.ThenIClickedOnTheLogoutLinkToGetLoggedOutFromTheApplication(); throw new Exception(e.ToString()); } }
public void GivenIClickTheCreateNewProgramLink() { try { GenericHelper.SelectWindow("Manage Programs"); _programManagementPage.ClickCreateNewProgramLink(); } catch (Exception e) { GenericHelper.Logs(e.ToString(), "FAILED"); GenericDefinitions.ThenIClickedOnTheLogoutLinkToGetLoggedOutFromTheApplication(); throw new Exception(e.ToString()); } }
public void WhenIAddTheCourse() { try { _objClassCreation.AddCourseInClass(); GenericHelper.Logs("course has been successfully added in the class", "Passed"); } catch (Exception e) { GenericHelper.Logs(e.ToString(), "FAILED"); GenericDefinitions.ThenIClickedOnTheLogoutLinkToGetLoggedOutFromTheApplication(); throw new Exception(e.ToString()); } }
public void WhenISelectTheClass(string classType) { try { _enrollClassesPage.SelectClassWithClassType(classType); } catch (Exception e) { GenericHelper.Logs(e.ToString(), "FAILED"); GenericDefinitions.ThenIClickedOnTheLogoutLinkToGetLoggedOutFromTheApplication(); Thread.Sleep(3000); throw new Exception(e.ToString()); } }
public void GivenICreateDistrictAsRootLevelOfOrganization() { try { _createOrganisation.CreateDistrictAtRootLevel(); } catch (Exception e) { GenericHelper.Logs(e.ToString(), "FAILED"); GenericDefinitions.ThenIClickedOnTheLogoutLinkToGetLoggedOutFromTheApplication(); Thread.Sleep(3000); throw new Exception(e.ToString()); } }
public void WhenISelectTheCourseWithPrefixBddmlasCSstudent(string course) { try { _myPegasusPage.ClickOnCourseAsTeacher(); } catch (Exception e) { GenericHelper.Logs(e.ToString(), "FAILED"); GenericDefinitions.ThenIClickedOnTheLogoutLinkToGetLoggedOutFromTheApplication(); Thread.Sleep(3000); throw new Exception(e.ToString()); } }
public void MoveTheMLtoRightFrame() { try { _objcontentLibrary.MoveToRightFrame(); GenericHelper.Logs("User selected the ML checkebox in left frame after entering class as teacher", "Passed"); } catch (Exception e) { GenericHelper.Logs(e.ToString(), "FAILED"); GenericDefinitions.ThenIClickedOnTheLogoutLinkToGetLoggedOutFromTheApplication(); throw new Exception(e.ToString()); } }
public void GivenIClickOnTheCreateNewOrganisationButton() { try { _organizationManagement.ClickCreateNewOrganisationButton(); } catch (Exception e) { GenericHelper.Logs(e.ToString(), "FAILED"); GenericDefinitions.ThenIClickedOnTheLogoutLinkToGetLoggedOutFromTheApplication(); Thread.Sleep(3000); throw new Exception(e.ToString()); } }
public void GivenISelectTheCourse(string courseType) { try { _coursesPage.SearchCourse(courseType); _coursesPage.ClickSelectAllCheckBox(); } catch (Exception e) { GenericHelper.Logs(e.ToString(), "FAILED"); GenericDefinitions.ThenIClickedOnTheLogoutLinkToGetLoggedOutFromTheApplication(); throw new Exception(e.ToString()); } }
public void GivenItShouldShowTheOrganizationAdminPage() { try { _organizationManagement.NavigatingToOrganizationManagementPage(); } catch (Exception e) { GenericHelper.Logs(e.ToString(), "FAILED"); GenericDefinitions.ThenIClickedOnTheLogoutLinkToGetLoggedOutFromTheApplication(); Thread.Sleep(3000); throw new Exception(e.ToString()); } }
public void WhenIAssociateTheCourseToProduct() { try { _addButtonPage.ClickAddButton(); _courseEnrollmentModePage.ClickSaveButton(); } catch (Exception e) { GenericHelper.Logs(e.ToString(), "FAILED"); GenericDefinitions.ThenIClickedOnTheLogoutLinkToGetLoggedOutFromTheApplication(); throw new Exception(e.ToString()); } }
public void WhenIClickOnTheEnrollInSelectedButton() { try { _enrollmentPage.ClickEnrollButton(); } catch (Exception e) { GenericHelper.Logs(e.ToString(), "FAILED"); GenericDefinitions.ThenIClickedOnTheLogoutLinkToGetLoggedOutFromTheApplication(); Thread.Sleep(3000); throw new Exception(e.ToString()); } }
public void GivenISearchTheClassToAddCourse() { try { _objClassCreation.ToSearchForAssigned(Enumerations.ClassType.NovaNETTemplate); GenericHelper.Logs("Class Has been searched successfully in order to add the courses", "Passed"); } catch (Exception e) { GenericHelper.Logs(e.ToString(), "FAILED"); GenericDefinitions.ThenIClickedOnTheLogoutLinkToGetLoggedOutFromTheApplication(); throw new Exception(e.ToString()); } }