public static bool DeleteGroup(String groupName)
 {
     try
     {
         IControl groupsTable = DL_DeleteGroupsPage.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);
             return(Control_ActionUtilities.Click_PerssEnterKey(DL_DeleteGroupsPage.DeleteButton, String.Empty));
         }
         else
         {
             return(Control_ActionUtilities.Click_PerssEnterKey(DL_DeleteGroupsPage.CancelButton, String.Empty));
         }
     }
     catch (Exception e)
     {
         new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
     }
     return(false);
 }
Example #2
0
        public void WhenIClickGroupNameInGroupManagementPage(string groupName)
        {
            WebTable_SearchCriteriaItemList searchCreteriaList = new WebTable_SearchCriteriaItemList();

            searchCreteriaList.AddSearchItem(new WebTable_SearchCriteriaItem(0, groupName, TableColumnContentType.Link));
            IControl tableRow      = WebTableUtilities.Table_FindRow(DL_GroupManagementPage.GroupsTable, searchCreteriaList);
            IControl groupNameLink = WebTableUtilities.GetElement(tableRow, groupName, 0, TableColumnContentType.Link);

            Control_ActionUtilities.Click_PerssEnterKey(groupNameLink, string.Empty);
        }
Example #3
0
 public static bool ClickStudyLink(String linkName)
 {
     try
     {
         return(Control_ActionUtilities.Click_PerssEnterKey(DS_HomePage.StudyManagementProcessLink(linkName), "Unable to find link " + linkName + " in Designer Home Page"));
     }
     catch (Exception e)
     {
         new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
     }
     return(false);
 }
Example #4
0
 public static bool ClickLabUnitTab(String linkName)
 {
     try
     {
         return(Control_ActionUtilities.Click_PerssEnterKey(MapLabDictionary.LabUnitLink(linkName), "Unable to find link " + linkName + " in Designer Home Page"));
     }
     catch (Exception e)
     {
         new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
         return(false);
     }
 }
        public static bool VerifyandClickErrorLink(String popupTitle, String errorMessage, String errorLinkName)
        {
            BrowserUtilities.DS_SwitchToConfirmationFrame();
            bool isClicked = false;

            if (IsModalExist_CheckHeaderTextAndErrorLinkMessage(popupTitle, errorMessage))
            {
                isClicked = Control_ActionUtilities.Click_PerssEnterKey(DS_HomePage.GetLink(errorLinkName), "Unable to find link " + errorLinkName + " in Designer Home Page");
            }
            BrowserUtilities.SwitchToWindow();
            return(isClicked);
        }
 public static bool InvokeLinkInStudyAdministrationPage(String linkName)
 {
     try
     {
         return(Control_ActionUtilities.Click_PerssEnterKey(DL_StudyAdministrationPage.GetLink(linkName), "Unable to find link " + linkName + " in StudyAdministration Page"));
     }
     catch (Exception e)
     {
         new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
         return(false);
     }
 }
Example #7
0
 public static bool AddStudyData(IEnumerable <StudyData> studydata, out List <String> failSiteList)
 {
     failSiteList = new List <String>();
     foreach (StudyData study in studydata)
     {
         if ((BP_DS_StudyCreationUtilities.EnterStudyData(study)))
         {
             Control_ActionUtilities.Click_PerssEnterKey(DS_StudyProperties.Save, String.Empty);
         }
     }
     return(true);
 }
 public static bool MapDomainItems(IEnumerable <LadMappingData> domaindata, out List <String> failSiteList)
 {
     failSiteList = new List <String>();
     foreach (LadMappingData domainitem in domaindata)
     {
         if ((DS_LabMappingUtilities.EnterStudyData(domainitem)))
         {
             Control_ActionUtilities.Click_PerssEnterKey(LabMappingsPage.LabMappingSave, String.Empty);
         }
     }
     return(true);
 }
        //public static bool SetQuestionsData(IEnumerable<FormQuestionsData> questionsdata, string questionLink)
        //{
        //    foreach (FormQuestionsData data in questionsdata)
        //    {
        //        if ((FormQuestionsUtilities.EnterStudyData(data, questionLink)))
        //        {
        //            Control_ActionUtilities.Click(DS_Forms.Save, String.Empty);

        //        }
        //    }
        //    return true;
        //}

        //public static bool EnterStudyData(FormQuestionsData study, string questionLink)
        //{
        //    BP_DS_HomePageUtilities.ClickLinkInDesignerHomePage(questionLink);
        //    //FormQuestionsUtilities.SetStudyData(DS_StudyProperties.StudyTable, study);
        //    return true;
        //}

        //public static void SetStudyData(IControl studyTable, FormQuestionsData study)
        //{

        //    //SetStudyFieldData_Dropdown(studyTable, "Therapeutic Area:", study.TherapeuticArea);
        //    //SetStudyFieldData_Dropdown(studyTable, "Therapeutic Area:", study.TherapeuticArea);
        //}

        //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;
        //}

        public static bool ClickFormChildQuestionsLink(String childQuestion)
        {
            try
            {
                return(Control_ActionUtilities.Click_PerssEnterKey(DS_Forms.GetChildQuestionLink(childQuestion), "Unable to find link " + childQuestion + " in Designer Home Page"));
            }
            catch (Exception e)
            {
                new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
                return(false);
            }
        }
Example #10
0
        public static bool ClickAutoBuildCheckBox()
        {
            try
            {
                return(Control_ActionUtilities.Click_PerssEnterKey(DS_Forms.AutoBuildCheckBox(), "Unable to check the autobuild checkbox"));
            }

            catch (Exception e)
            {
                new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
                return(false);
            }
        }
Example #11
0
 public static bool EditLab(String labId, LabData lab)
 {
     try
     {
         IControl labLink = BP_LabManagementUtilities.GetLabLink(labId);
         Control_ActionUtilities.Click_PerssEnterKey(labLink, String.Empty);
         return(BP_LabCreationUtilities.AddLab(lab));
     }
     catch (Exception e)
     {
         new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
     }
     return(false);
 }
 public static bool ClickStudyLink(String linkName)
 {
     BrowserUtilities.DS_SwitchToFrame();
     try
     {
         Control_ActionUtilities.Click_PerssEnterKey(DS_HomePage.GetLink(linkName), "Unable to find link " + linkName + " in Designer Home Page");
         BrowserUtilities.SwitchToWindow();
         return(true);
     }
     catch (Exception e)
     {
         new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
     }
     return(false);
 }
 public static bool Login_prompt_download_false(String browserType, String url, String userName, String password)
 {
     try
     {
         BrowserUtilities.LaunchBrowser_prompt_download_false(browserType, url);
         Control_ActionUtilities.Textbox_SetText(DS_LoginPage.UserNameTextBox, userName, "Unable to set user name in LoginPage");
         Control_ActionUtilities.Textbox_SetText(DS_LoginPage.PasswordTextBox, password, "Unable to set password in LoginPage");
         Control_ActionUtilities.Click_PerssEnterKey(DS_LoginPage.LoginButton, "Unable to click login button in LoginPage");
     }
     catch (Exception e)
     {
         new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
         return(false);
     }
     return(true);
 }
 public static bool LoginInExistingPage(String userName, String password)
 {
     try
     {
         Control_ActionUtilities.Textbox_SetText(DL_LoginPage.UserNameTextbox, userName, "Unable to set user name in LoginPage");
         Control_ActionUtilities.Textbox_SetText(DL_LoginPage.PasswordTextbox, password, "Unable to set password in LoginPage");
         Control_ActionUtilities.Click_PerssEnterKey(DL_LoginPage.LoginButton, "Unable to click login button in LoginPage");
         BrowserUtilities.SwitchToFrame();
         Control_ActionUtilities.ClickModalButton(DL_ActivityLogWindow.CloseButton);
         BrowserUtilities.SwitchToWindow();
     }
     catch (Exception e)
     {
         new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
         return(false);
     }
     return(true);
 }
        public static bool EnterValueInSearchField(string FieldName, string SearchText)
        {
            bool status = false;

            try
            {
                IControl SearchFld = DL_QueryRunWizardPage.GetSearchField(FieldName);
                status = Control_ActionUtilities.Textbox_SetText(SearchFld, SearchText, "Unable to enter search criteria '" + SearchText + "' in the '" + FieldName + "' field.");
                if (status == true)
                {
                    status = Control_ActionUtilities.Click_PerssEnterKey(SearchFld, string.Empty);
                    Thread.Sleep(10000);
                }
            }
            catch (Exception e)
            {
                new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
                //return false;
            }
            return(status);
        }
Example #16
0
 public void WhenUserSelectsLabManagementLink()
 {
     Control_ActionUtilities.Click_PerssEnterKey(DL_StudyAdministrationPage.GetLink("Lab Management"), "Unable to click Lab Management link.");
 }
 public static bool EnterSiteData(SiteData site)
 {
     BP_SiteCreationUtilities.SetSiteData(DL_AddSitePage.AddSiteTable, site);
     Control_ActionUtilities.Click_PerssEnterKey(DL_AddSitePage.SaveButton, String.Empty);
     return(IsSiteSaved());
 }
Example #18
0
 public void GivenTheUserSelectGroupManagementLinkOnStudyAdministrationPage_()
 {
     Control_ActionUtilities.Click_PerssEnterKey(DL_StudyAdministrationPage.GetLink("Group Management"), "Unable to click Group Management link.");
 }