public static bool AddGroup(String groupName, String defaultPortal)
 {
     try
     {
         IControl groupsTable = DL_AddGroupsPage.GroupsTable;
         WebTable_SearchCriteriaItem     searchCreteriaItem = new WebTable_SearchCriteriaItem(0, groupName, TableColumnContentType.CheckboxAndText);
         WebTable_SearchCriteriaItemList list = new WebTable_SearchCriteriaItemList();
         list.AddSearchItem(searchCreteriaItem);
         IControl tableRow = WebTableUtilities.Table_FindRow(groupsTable, list);
         if (tableRow != null)
         {
             IControl checkbox = WebTableUtilities.GetElement(tableRow, String.Empty, 0, TableColumnContentType.CheckboxAndText);
             Control_ActionUtilities.Click(checkbox, String.Empty);
             IControl dropdown = WebTableUtilities.GetElement(tableRow, String.Empty, 1, TableColumnContentType.Dropdown);
             Control_ActionUtilities.Dropdown_SelectItem(dropdown, defaultPortal, String.Empty);
             return(Control_ActionUtilities.Click_PerssEnterKey(DL_AddGroupsPage.AddButton, String.Empty));
         }
         else
         {
             return(Control_ActionUtilities.Click_PerssEnterKey(DL_AddGroupsPage.CancelButton, String.Empty));
         }
     }
     catch (Exception e)
     {
         new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
     }
     return(false);
 }
 public static bool SelectEventOnPatientIdentifiersPageAndWait(string EventToSelect)
 {
     try
     {
         IControl EventField = DL_DefinePatientIdentifiers.EventSelectionDropdown;
         if (!Control_ActionUtilities.Dropdown_SelectItem(EventField, EventToSelect, "Unable to select " + EventToSelect + " from Event dropdown."))
         {
             return(false);
         }
         IControl FormsLoadSection = DL_DefinePatientIdentifiers.FormsLoaded;
         if (FormsLoadSection != null && FormsLoadSection.WebElement != null)
         {
             return(true);
         }
         else
         {
             return(false);
         }
     }
     catch (Exception e)
     {
         new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
     }
     return(false);
 }
 public static bool RemoveUserFromSiteUsers(String userName)
 {
     try
     {
         //if (!Control_ActionUtilities.Dropdown_IsItemAvailable(DL_Site_ManageUsersPage.AvailableUsersListBox, userName, String.Empty))
         //{
         if (Control_ActionUtilities.Dropdown_SelectItem(DL_Site_ManageUsersPage.SiteUsersListBox, userName, String.Empty))
         {
             if (Control_ActionUtilities.Click(DL_Site_ManageUsersPage.RemoveButton, String.Empty))
             {
                 return(Control_ActionUtilities.Click(DL_Site_ManageUsersPage.SaveButton, String.Empty));
             }
         }
         //}
         else
         {
             return(Control_ActionUtilities.Click(DL_Site_ManageUsersPage.CancelButton, String.Empty));
         }
     }
     catch (Exception e)
     {
         new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
     }
     return(false);
 }
 public static bool SetQuickExportData(QuickExportData data)
 {
     try
     {
         if (!String.IsNullOrEmpty(data.Site))
         {
             Control_ActionUtilities.Dropdown_SelectItem(DL_QuickExportPage.SiteDropdown, data.Site, String.Empty);
         }
         if (!String.IsNullOrEmpty(data.Patient))
         {
             Control_ActionUtilities.Dropdown_SelectItem(DL_QuickExportPage.PatientDropdown, data.Patient, String.Empty);
         }
         if (!String.IsNullOrEmpty(data.Event))
         {
             Control_ActionUtilities.Dropdown_SelectItem(DL_QuickExportPage.EventDropdown, data.Event, String.Empty);
         }
         if (!String.IsNullOrEmpty(data.Form))
         {
             Control_ActionUtilities.Dropdown_SelectItem(DL_QuickExportPage.FormsDropdown, data.Form, String.Empty);
         }
         if (!String.IsNullOrEmpty(data.Format))
         {
             Control_ActionUtilities.Dropdown_SelectItem(DL_QuickExportPage.FormatDropdown, data.Format, String.Empty);
         }
         return(true);
     }
     catch (Exception e)
     {
         new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
     }
     return(false);
 }
        public static bool SelectDefaultAsYesForQuestions(List <DefinePatientIdentifiers> QuestionsData, out List <string> FailedQuestions)
        {
            FailedQuestions = new List <string>();
            bool isSuccess = true;

            try
            {
                foreach (DefinePatientIdentifiers DataItem in QuestionsData)
                {
                    IControl DefaultDropdown = DL_DefinePatientIdentifiers.DefaultDropdownForQuestionInCRF(DataItem.QuestionPrompt);
                    if (Control_PropertyUtilities.IsControlNull(DefaultDropdown))
                    {
                        isSuccess = false;
                    }
                    if (!Control_ActionUtilities.Dropdown_SelectItem(DefaultDropdown, "Yes", "Unable to select Yes in Default dropdown for question prompt '" + DataItem.QuestionPrompt + "'."))
                    {
                        FailedQuestions.Add(DataItem.QuestionPrompt);
                        isSuccess = false;
                    }
                }
                return(isSuccess);
            }
            catch (Exception e)
            {
                new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
            }
            return(false);
        }
Beispiel #6
0
 static bool SetStudyFieldData_Dropdown(IControl StudyTable, String searchText, String valueToSet)
 {
     if (valueToSet != null)
     {
         IControl row      = WebTableUtilities.Table_FindRow(StudyTable, GetSearchItemList(searchText));
         IControl dropdown = WebTableUtilities.GetElement(row, String.Empty, 1, TableColumnContentType.Dropdown);
         return(Control_ActionUtilities.Dropdown_SelectItem(dropdown, valueToSet, String.Empty));
     }
     return(false);
 }
Beispiel #7
0
 public static bool DefaultSaveOptionSelect(string DefaultSaveOption)
 {
     try
     {
         return(Control_ActionUtilities.Dropdown_SelectItem(DL_Study_EditPreferences_FormsPage.DefaultSave, DefaultSaveOption, "Unable to Select the Default Save Option " + DefaultSaveOption + " in Forms tab under Edit Preferences"));
     }
     catch (Exception e)
     {
         new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
     }
     return(false);
 }
Beispiel #8
0
 public static bool SelectItemInItemList1(String item)
 {
     try
     {
         return(Control_ActionUtilities.Dropdown_SelectItem(DL_Study_EditPreferences_DCFsPage.ItemListbox1, item, String.Empty));
     }
     catch (Exception e)
     {
         new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
     }
     return(false);
 }
 public static bool SelectDataGroupItem(String sponsorName)
 {
     try
     {
         return(Control_ActionUtilities.Dropdown_SelectItem(DS_Forms.DataGroupSelectionDropDown, sponsorName, "Unable to select " + sponsorName));
     }
     catch (Exception e)
     {
         new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
     }
     return(false);
 }
 public static bool SelectPortalDropdownComparatorItem(String itemName)
 {
     try
     {
         return(Control_ActionUtilities.Dropdown_SelectItem(DS_Forms.ComparatorSelectionDropDown, itemName, "Unable to select " + itemName));
     }
     catch (Exception e)
     {
         new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
     }
     return(false);
 }
 public static bool SelectLabMappingDomain(String itemName)
 {
     try
     {
         return(Control_ActionUtilities.Dropdown_SelectItem(LabMappingsPage.SelectionLabMappingDomainDropDown, itemName, "Unable to select " + itemName));
     }
     catch (Exception e)
     {
         new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
     }
     return(false);
 }
 public static bool SelectPortalDropdownKeySequenceItem(int keySequenceItem)
 {
     try
     {
         return(Control_ActionUtilities.Dropdown_SelectItem(DS_Forms.KeySequenceSelectionDropDown, keySequenceItem.ToString(), "Unable to select " + keySequenceItem));
     }
     catch (Exception e)
     {
         new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
     }
     return(false);
 }
 public static bool SetStatus(String status)
 {
     try
     {
         return(Control_ActionUtilities.Dropdown_SelectItem(DL_PatientStatusOverridePage.ChangeToDropdown, status, String.Empty));
     }
     catch (Exception e)
     {
         new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
     }
     return(false);
 }
Beispiel #14
0
 public static bool SetValueForCustomFieldDropdown2(String value)
 {
     try
     {
         return(Control_ActionUtilities.Dropdown_SelectItem(DL_EditDCFPage.CustomFieldDropdown2, value, String.Empty));
     }
     catch (Exception e)
     {
         new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
     }
     return(false);
 }
 public static bool SelectAutobuildtableDomainName(String itemName)
 {
     try
     {
         return(Control_ActionUtilities.Dropdown_SelectItem(DS_Forms.SelectionAutoBuildTableDomainName, itemName, "Unable to select " + itemName));
     }
     catch (Exception e)
     {
         new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
     }
     return(false);
 }
Beispiel #16
0
 public static bool SetTimeZone(String timeZone)
 {
     try
     {
         return(Control_ActionUtilities.Dropdown_SelectItem(DL_UserPreferencesPage.TimeZoneDropdown, timeZone, String.Empty));
     }
     catch (Exception e)
     {
         new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
     }
     return(false);
 }
 public static bool SelectGroupLinkageItem(String codeListGroup, String codeListLinkage)
 {
     try
     {
         Control_ActionUtilities.Dropdown_SelectItem(DS_Forms.CodeListGroup, codeListGroup, "Unable to select sponsor");
         Control_ActionUtilities.Dropdown_SelectItem(DS_Forms.CodeListLinkage, codeListLinkage, "Unable to select sponsor");
         return(true);
     }
     catch (Exception e)
     {
     }
     return(false);
 }
        public static bool SelectDomainInTableName(String DomainName)
        {
            try
            {
                Control_ActionUtilities.Dropdown_SelectItem(DS_Forms.SelectionDomainInTableName, DomainName, "Unable to select domain");

                return(true);
            }
            catch (Exception e)
            {
            }
            return(false);
        }
Beispiel #19
0
 public static bool SelectEvent(String eventName)
 {
     try
     {
         IControl eventsListbox = DL_AddUnscheduledEventStep1Page.EventsListbox;
         return(Control_ActionUtilities.Dropdown_SelectItem(eventsListbox, eventName, String.Empty));
     }
     catch (Exception e)
     {
         new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
     }
     return(false);
 }
 public static bool SetDropdownValueForSearchCriteria(String dropdownName, String dropdownValue)
 {
     try
     {
         IControl dropdown = DL_DCFs_SearchPalette.GetDropdown_SearchPalette(dropdownName);
         return(Control_ActionUtilities.Dropdown_SelectItem(dropdown, dropdownValue, String.Empty));
     }
     catch (Exception e)
     {
         new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
     }
     return(false);
 }
        public static bool SelectKeySequenceInQuestion(String KeySequence)
        {
            try
            {
                Control_ActionUtilities.Dropdown_SelectItem(DS_Forms.KeySequenceInQuestion, KeySequence, "Unable to select Key sequence");

                return(true);
            }
            catch (Exception e)
            {
            }
            return(false);
        }
 public static bool SelectAutobuildFormItemName(String itemName)
 {
     //Thread.Sleep(3000);
     try
     {
         return(Control_ActionUtilities.Dropdown_SelectItem(DS_Forms.SelectionFormQuestionItemName, itemName, "Unable to select " + itemName));
     }
     catch (Exception e)
     {
         new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
     }
     return(false);
 }
Beispiel #23
0
 public static bool SelectLabUnitCodeValueItem(String itemName)
 {
     try
     {
         Control_ActionUtilities.Dropdown_SelectItem(MapLabDictionary.SelectLabUnitCodeValueDropDown, itemName, "Unable to select " + itemName);
         //Thread.Sleep(5000);
         return(true);
     }
     catch (Exception e)
     {
         new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
     }
     return(false);
 }
Beispiel #24
0
 public static bool selectValueFromDropDown(String valueToBeSelected, String dropDown)
 {
     try
     {
         IControl dropdowncontrol = DS_StudyProperties.LabDropDown;
         Control_ActionUtilities.Click(dropdowncontrol, "Not able to click on dropdowncontrol");
         IControl selectValueInDropdown = DS_StudyProperties.LabDropDownOptions;
         return(Control_ActionUtilities.Dropdown_SelectItem(dropdowncontrol, valueToBeSelected, "Valuenotselected"));
     }
     catch (Exception e)
     {
         new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
     }
     return(false);
 }
Beispiel #25
0
 public static bool SetDropdownValue(String dropdownName, String dropdownValue)
 {
     try
     {
         IControl dropdown = GetDropdown_SearchPalette(dropdownName);
         dropdown.WebElement.Click();
         //Control_ActionUtilities.Click(dropdown 'Target App drop down not clicked');
         return(Control_ActionUtilities.Dropdown_SelectItem(dropdown, dropdownValue, String.Empty));
     }
     catch (Exception e)
     {
         new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
     }
     return(false);
 }
 public static bool KeySequenceItems(String headerName, int p0)
 {
     try
     {
         string str = Convert.ToString(p0);
         Control_ActionUtilities.Textbox_SetText(DS_Forms.HeaderName, headerName, String.Empty);
         Control_ActionUtilities.Dropdown_SelectItem(DS_Forms.KeySequence, str, "Unable to select sponsor");
         return(true);
     }
     catch (Exception e)
     {
         new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
         return(false);
     }
 }
Beispiel #27
0
 public static bool SelectPlanFromSelectNewPlanDropdown(string AvailablePlan)
 {
     try
     {
         if (AvailablePlan != null)
         {
             return(Control_ActionUtilities.Dropdown_SelectItem(DL_FlagManagementPage.SelectNewPlanDropDown, AvailablePlan, "Unable to select the Plan " + AvailablePlan + " in the Select New Plan dropdown"));
         }
     }
     catch (Exception e)
     {
         new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
     }
     return(false);
 }
Beispiel #28
0
 public static bool SelectReasonFromReasonforchangeDropdown(string AvailableReasonforchange)
 {
     try
     {
         if (AvailableReasonforchange != null)
         {
             return(Control_ActionUtilities.Dropdown_SelectItem(DL_FlagManagementPage.ReasonForChangeDropDown, AvailableReasonforchange, "Unable to select the reason " + AvailableReasonforchange + " from the Reason for change dropdown"));
         }
     }
     catch (Exception e)
     {
         new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
     }
     return(false);
 }
Beispiel #29
0
        public static bool SetReasonForChange(String reason)
        {
            bool retVal = false;

            BrowserUtilities.SwitchToFrame();
            try
            {
                retVal = Control_ActionUtilities.Dropdown_SelectItem(DL_ModalWindow_DeleteTableRow.ReasonForChangeDropdown, reason, String.Empty);
            }
            catch (Exception e)
            {
                new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
            }
            BrowserUtilities.SwitchToWindow();
            return(retVal);
        }
 public static bool ChangeStatusInStudyManagementPage(String status)
 {
     try
     {
         if (Control_ActionUtilities.Dropdown_SelectItem(DL_StudyManagementPage.StudyStausDropdown, status, String.Empty))
         {
             return(Control_ActionUtilities.Click(DL_StudyManagementPage.SaveButton, String.Empty));
         }
     }
     catch (Exception e)
     {
         new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
         return(false);
     }
     return(false);
 }