Beispiel #1
0
 public void ThenIClickOkInModalDialogHavingTitleAndMessage(string titleText, string messageText)
 {
     if (!BP_ModalWindow.ClickOk(titleText, messageText))
     {
         ScenarioContext.Current["ActResult"] = "Failed";
     }
 }
Beispiel #2
0
 public void WhenIClickContinueInModalDialogHavingTitleAndPartialMessage(string titleText, string messageText_Partial)
 {
     if (!BP_ModalWindow.ClickContinue(titleText, messageText_Partial))
     {
         ScenarioContext.Current["ActResult"] = "Failed";
     }
 }
        public static bool SetPermissionsForLoggedinUserGroup(List <GroupPermissionsData> dataList)
        {
            bool arePermissionsChanged = false;

            try
            {
                if (SetPermissions(dataList, out arePermissionsChanged))
                {
                    if (SavePermissions())
                    {
                        BP_ModalWindow.ClickContinue("Edit Permissions", "group security you belong to");
                        return(BP_BreadCrumbUtilities.ClickBreadCrumbItem("Study Administration"));
                    }
                    if (arePermissionsChanged)
                    {
                        BP_Modal_ResetSession.ClickContinue("continue your session");
                        return(BP_DataManagerPortalDropdownUtilities.SelectPortalDropdownItem("Study Administration"));
                    }
                }
            }
            catch (Exception e)
            {
                new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
            }
            return(false);
        }
Beispiel #4
0
 public void ThenISeeAModalDialogHavingTitleAndPartialMessage(String title, String bodyMessageText)
 {
     if (!BP_ModalWindow.IsModalExist_VerifyHeaderTextAndBodyMessage(title, bodyMessageText))
     {
         ScenarioContext.Current["ActResult"] = "Failed";
     }
 }
Beispiel #5
0
 public void WhenIClickSaveButtonInEventActualDatePage()
 {
     if (!BP_ModalWindow.ClickSaveButton("Event Actual Date"))
     {
         ScenarioContext.Current["ActResult"] = "Failed";
     }
 }
 public static void DeleteStagedStudy()
 {
     BP_StudyVersionManagementUtilities.InvokeStudyRow("Staged");
     BP_ActionPaletteUtilities.InvokeActionPaletteLink("Cancel", "StudyVersionPropertiesActions");
     BP_ModalWindow.ClickContinue("Cancel Study", "status back to Uploaded.");
     DeleteUploadedStudy();
 }
 public void WhenIClickYesButtonInModalDialog(String modalDialogTitle)
 {
     if (!BP_ModalWindow.ClickYesButton(modalDialogTitle))
     {
         ScenarioContext.Current["ActResult"] = "Failed";
     }
 }
 public void WhenIClickOkButtonOfModal(string modalDialogTitle)
 {
     if (!BP_ModalWindow.ClickContinue(modalDialogTitle))
     {
         ScenarioContext.Current["ActResult"] = "Failed";
     }
 }
        public static bool SetNewEventDate(string NewEventDate)
        {
            bool retVal = false;

            try
            {
                BrowserUtilities.SwitchToFrame();
                if (!BP_ModalWindow.IsRadModalExist_CheckHeaderText("Event Actual Date"))
                {
                    IControl eventsTable = DL_Patient_EventFormsPage.NewEventDate;
                    retVal = Control_ActionUtilities.Textbox_SetText(DL_Patient_EventFormsPage.NewEventDate, NewEventDate, String.Empty);
                }
            }
            catch (Exception e)
            {
            }
            BrowserUtilities.SwitchToWindow();
            return(retVal);
        }
 public static bool SetPermissionsForNonLoggedinUserGroup(List <GroupPermissionsData> dataList)
 {
     try
     {
         bool arePermissionsChanged = false;
         if (SetPermissions(dataList, out arePermissionsChanged))
         {
             if (SavePermissions())
             {
                 BP_ModalWindow.ClickContinue("Edit Permissions", "group security you belong to");
             }
         }
     }
     catch (Exception e)
     {
         new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
     }
     return(false);
 }
        public static bool UpdateEventDate(Event_New_EventDate EventDateDetails)
        {
            bool retVal = false;

            try
            {
                BrowserUtilities.SwitchToFrame();

                if (!BP_ModalWindow.IsRadModalExist_CheckHeaderText("Event Actual Date"))
                {
                    retVal = Control_ActionUtilities.Textbox_SetText(DL_Patient_EventFormsPage.NewEventDate, EventDateDetails.EnterNewValue, String.Empty) &&
                             Control_ActionUtilities.Dropdown_SelectItem(DL_Patient_EventFormsPage.SelectEventDateReasonForChange, EventDateDetails.ReasonforChange, String.Empty) &&
                             Control_ActionUtilities.Textbox_SetText(DL_Patient_EventFormsPage.EventDateAdditionalNotes, EventDateDetails.AdditionalNotes, String.Empty);
                }
            }
            catch (Exception e)
            {
            }
            BrowserUtilities.SwitchToWindow();
            return(retVal);
        }
        public static bool DeletePublishedStudy()
        {
            try
            {
                if (BP_StudyVersionManagementUtilities.IsStudyAvailable())
                {
                    BP_BreadCrumbUtilities.ClickBreadCrumbItem("Study Management");
                    BP_ActionPaletteUtilities.InvokeActionPaletteLink("Reset Study", "StudyResetAction");
                    BP_ModalWindow.ClickContinue("Reset Study", "Study Reset will delete");
                    BP_ActionPaletteUtilities.InvokeActionPaletteLink("Manage Versions", "StudyResetAction");
                    BP_StudyVersionManagementUtilities.InvokeStudyRow("Published");
                    BP_ActionPaletteUtilities.InvokeActionPaletteLink("Recall", "StudyVersionPropertiesActions");
                    BP_ModalWindow.ClickContinue("Recall Study", "complete database backup");

                    DeleteUploadedStudy();
                }
                return(true);
            }
            catch (Exception e)
            {
                new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
                return(false);
            }
        }
 public static void DeleteUploadedStudy()
 {
     BP_StudyVersionManagementUtilities.InvokeStudyRow("Uploaded");
     BP_ActionPaletteUtilities.InvokeActionPaletteLink("Delete", "StudyVersionPropertiesActions");
     BP_ModalWindow.ClickContinue("Delete Study", "permanently remove");
 }