/// <summary>
 /// navigate to the create manual test page
 /// </summary>
 /// <returns>Workflows</returns>
 public CreateManualTestWorkflows NavigateToCreateManualTestPage()
 {
     AssessWorkflows.NavigateToAssessDashboardPage();
     AssessWorkflows.CreateTestPortalPage = null;
     if ((AssessWorkflows.Workflows.IsDistrictAdmin) ||
         (AssessWorkflows.Workflows.IsLeadership) ||
         (AssessWorkflows.Workflows.IsStudent) ||
         (AssessWorkflows.Workflows.IsSystemSetup) ||
         (AssessWorkflows.Workflows.IsStateAdmin))
     {
         AssessWorkflows.ProfileHomePage      = AssessWorkflows.ProfileHomePage;
         AssessWorkflows.CreateTestPortalPage = AssessWorkflows.ProfileHomePage.CreateATest();
     }
     if (AssessWorkflows.Workflows.IsTeacher)
     {
         AssessWorkflows.ProfileHomePage      = AssessWorkflows.TeacherProfileHomePage;
         AssessWorkflows.CreateTestPortalPage = AssessWorkflows.TeacherProfileHomePage.CreateATest();
     }
     if (AssessWorkflows.CreateTestPortalPage == null)
     {
         throw new Exception("Navigate to the ProfileHomePage before trying to use this workflow.");
     }
     AssessWorkflows.CreateTestManualPage = AssessWorkflows.CreateTestPortalPage.Detail.CreateManualTest();
     if (AssessWorkflows.CreateTestManualPage.Data == null)
     {//use default data
         AssessWorkflows.CreateTestManualPage.InitData();
         AssessWorkflows.CreateTestManualPage.Data.GetTestDataFromResxResource(
             "UITests.Data.Assess.TestCreateEdit.CreateTestResource",
             "default_" + this.TestConfiguration.ApplicationName, 0);
     }
     return(this);
 }
コード例 #2
0
 /// <summary>
 /// navigate to the edit test item: choose new item page
 /// </summary>
 /// <returns>Workflows</returns>
 public CreateItemWorkflows NavigateToEditTestItemChooseNewItemPage()
 {
     AssessWorkflows.NavigateToAssessDashboardPage();
     AssessWorkflows.EditTestItemChooseNewItemPage = null;
     if ((AssessWorkflows.Workflows.IsDistrictAdmin) ||
         (AssessWorkflows.Workflows.IsLeadership) ||
         (AssessWorkflows.Workflows.IsStudent) ||
         (AssessWorkflows.Workflows.IsSystemSetup))
     {
         AssessWorkflows.EditTestItemChooseNewItemPage = AssessWorkflows.ProfileHomePage.CreateAnItem();
     }
     if (AssessWorkflows.Workflows.IsTeacher)
     {
         AssessWorkflows.EditTestItemChooseNewItemPage = AssessWorkflows.TeacherProfileHomePage.CreateAnItem();
     }
     if (AssessWorkflows.EditTestItemChooseNewItemPage == null)
     {
         throw new Exception("Navigate to the AssessDashboardPage before trying to use this workflow.");
     }
     return(this);
 }