예제 #1
0
        public void ManageGuestList()
        {
            string targetStudy = "AutoTest-" + DataGen.String(5);

            CloneEntity("STUDY00000017", targetStudy);

            var ActionsNav = new ActivitiesNav();
            var ManageGuestListPagePopup = new ManageGuestList("STUDY-" + targetStudy, "Manage Guest List");
            var SelectPersonsPage        = new ChooserPopup("Persons", true);

            Store.LoginAsUser(Users.Irbd);

            var studyForReview = new CCElement(By.LinkText(targetStudy));

            studyForReview.Click();

            ActionsNav.LnkManageGuestList.Click();
            ManageGuestListPagePopup.SwitchTo();
            ManageGuestListPagePopup.BtnAddGuest.Click();

            SelectPersonsPage.SwitchTo();
            SelectPersonsPage.SelectValue("Jones (irbc2)", "Last");
            SelectPersonsPage.BtnOk.Click();
            SelectPersonsPage.SwitchBackToParent();

            ManageGuestListPagePopup.BtnOk.Click();
            ManageGuestListPagePopup.SwitchBackToParent();

            Wait.Until(h => new CCElement(By.LinkText("Guest List Updated")).Exists);
            Assert.IsTrue(new CCElement(By.LinkText("Guest List Updated")).Exists, "'Guest List Updated' activity not found for:  " + targetStudy);
        }
 public void SelectPrimaryContact(string user)
 {
     BtnSelectUser.Click();
     PrimaryContactPopup.SwitchTo();
     PrimaryContactPopup.SelectValue(user);
     PrimaryContactPopup.BtnOk.Click();
     PrimaryContactPopup.SwitchBackToParent();
     BtnOk.Click();
 }
        public void SelectOrganization(string orgName)
        {
            IEnumerable <CCElement> buttons = ReviewPersonContainer.GetDescendants(".//td[3]/span/input");
            CCElement BtnSelectOrg          = buttons.FirstOrDefault(h => h.GetAttributeValue("type") == "button");

            if (BtnSelectOrg != null)
            {
                Trace.WriteLine("Clicking on Select Organization...");
                BtnSelectOrg.Click();
            }
            SelectOrgPage.SwitchTo();
            SelectOrgPage.SelectValue("Immunology");
            SelectOrgPage.BtnOk.Click();
            SelectOrgPage.SwitchBackToParent();
        }
 public void SelectTeamMember(string user = "")
 {
     BtnSelectTeamMember.Click();
     selectPersonPopup.SwitchTo();
     if (user == "")
     {
         Radio firstChoice = new Radio(By.CssSelector("input[type='radio']"));
         firstChoice.Click();
     }
     else
     {
         selectPersonPopup.SelectValue(user);
     }
     selectPersonPopup.BtnOk.Click();
     selectPersonPopup.SwitchBackToParent();
 }