/// <summary> /// Enter Url in Mock Application. /// </summary> /// <param name="itemUrl">This is Item Url.</param> /// <param name="externalCourseId">This is External Course Id.</param> /// <param name="appendValue">This is Append Value.</param> public void EnterUrlInMockApplication( PostingTheDataInMockEnum postingTheDataInMockEnum, string getWritingspaceHeaderUrl, string externalCourseId, string appendValue) { //Enter Url in Mock Application Logger.LogMethodEntry("PostRestServicePage", "EnterUrlInMockApplication", base.IsTakeScreenShotDuringEntryExit); //Initialize Variable string getConcatenatedItemUrl = string.Empty; //Initialize Variable string getConcatenatedGradeUrl = string.Empty; try { //Select the window new ContentLibraryUXPage().SelectTheWindowName(PostRestServiceResource. PostRestServicePage_HomePage_Mock_Window_Name); switch (postingTheDataInMockEnum) { case PostingTheDataInMockEnum.ItemPost: //Get Concatenated item URL getConcatenatedItemUrl = getWritingspaceHeaderUrl + externalCourseId + appendValue; //Fill The Post Item URL Value this.FillTheMockApplicationDetailsValue(getConcatenatedItemUrl, PostRestServiceResource.PostRestServicePage_URL_Text_Id_Locator); break; case PostingTheDataInMockEnum.GradePost: //Fetch the activity from memory Activity activity = Activity.Get(Activity.ActivityTypeEnum.WritingSpace); //Get the concatenated grade URL getConcatenatedGradeUrl = getWritingspaceHeaderUrl + externalCourseId + appendValue + PostRestServiceResource.PostRestServicePage_HeaderUrl_Slash_Character + activity.ActivityId + PostRestServiceResource.PostRestServicePage_HeaderUrl_Appendgrades; //Fill The Post Grade URL Value this.FillTheMockApplicationDetailsValue(getConcatenatedGradeUrl, PostRestServiceResource.PostRestServicePage_URL_Text_Id_Locator); break; } } catch (Exception e) { ExceptionHandler.HandleException(e); } Logger.LogMethodExit("PostRestServicePage", "EnterUrlInMockApplication", base.IsTakeScreenShotDuringEntryExit); }
/// <summary> /// Send The Request Details To Add Activity In GBR. /// </summary> /// <param name="activity">This is post Data Type Enum.</param> public void SendTheRequestDetailsToAddActivityInGBR( PostingTheDataInMockEnum postingTheDataInMockEnum) { //Get Searched Course in Course Space Logger.LogMethodEntry("PostRestServicePage", "SendTheRequestDetailsToAddActivityInGBR", base.IsTakeScreenShotDuringEntryExit); try { //Fetch the Course ID from memory Course course = Course.Get(Course.CourseTypeEnum.ExternalCourse); string getcourseId = course.ExternalCourseId; Activity activity = Activity.Get(Activity.ActivityTypeEnum.WritingSpace); //Split the course id string getexternalCorseId = getcourseId.Split(Convert.ToChar (PostRestServiceResource.PostRestServicePage_Split_ColonSeperated)) [Convert.ToInt32(PostRestServiceResource. PostRestServicePage_Split_Array_SecondValue)]; //Select the window new ContentLibraryUXPage().SelectTheWindowName(PostRestServiceResource. PostRestServicePage_HomePage_Mock_Window_Name); switch (postingTheDataInMockEnum) { case PostingTheDataInMockEnum.ItemPost: //Enter the course details in Requestbody this.EnterTheCourseDetailsInRequestBody(getcourseId, getexternalCorseId, activity.Name); break; case PostingTheDataInMockEnum.GradePost: //Enter The Course Details To Post The Grade In RequestBody this.EnterTheCourseDetailsToPostTheGradeInRequestBody(getcourseId, getexternalCorseId); break; } //Click The Execute Button this.ClickTheExecuteButton(); } catch (Exception e) { ExceptionHandler.HandleException(e); } Logger.LogMethodExit("PostRestServicePage", "SendTheRequestDetailsToAddActivityInGBR", base.IsTakeScreenShotDuringEntryExit); }