Esempio n. 1
0
        public void Login(string emailAddress, string password)
        {
            EmailAddress.Click();
            EmailAddress.Clear();
            EmailAddress.SendKeys(emailAddress);

            Password.Click();
            Password.Clear();
            Password.SendKeys(password);

            SignInButton.Click();
        }
Esempio n. 2
0
        /// <summary>
        /// Search and edit the created user.
        /// </summary>
        /// <param name="fromUser">From user.</param>
        /// <param name="toUser">To user.</param>
        /// <param name="editedEmail">The edited email.</param>
        public void SearchAndEditTheCreatedUser(string fromUser, string toUser, string editedEmail)
        {
            UserSearch.SendKeys(uName);
            EditButton.Click();
            EmailAddress.Clear();
            EmailAddress.SendKeys(editedEmail);

            if (fromUser.ToLower().Contains("ctu"))
            {
                ClinicalTrialUnitUser.Click();
            }
            else if (fromUser.ToLower().Contains("admin"))
            {
                ClinicalTrialAdminUser.Click();
            }
            else if (fromUser.ToLower().Contains("lhd"))
            {
                LocalHealthDistrictUser.Click();
            }

            if (toUser.ToLower().Contains("ctu"))
            {
                ClinicalTrialUnitUser.Click();
                PageHelper.PickAllValuesFromDropdown(CT_Units);
            }
            else if (toUser.ToLower().Contains("admin"))
            {
                ClinicalTrialAdminUser.Click();
            }
            else if (toUser.ToLower().Contains("lhd"))
            {
                LocalHealthDistrictUser.Click();
                PageHelper.PickAllValuesFromDropdown(LH_Districts);
            }
            SaveUserButton.Click();
            BackToListButton.Click();
        }
 private void SetRandomEmailAddress()
 {
     EmailAddress.Clear();
     EmailAddress.SendKeys(Data.RandomValuesGenerator.GenerateRandomEmailAddress());
 }