예제 #1
0
 public bool Validate()
 {
     return(!(
                InvitedBy == null ||
                InvitedBy.UserID == 0 ||
                string.IsNullOrEmpty(UserFirstName.Trim()) ||
                string.IsNullOrEmpty(UserLastName.Trim()) ||
                string.IsNullOrEmpty(UserEmail.Trim()) ||
                string.IsNullOrEmpty(UserPassword.Trim())
                ));
 }
        public void EdiProfileApplication()
        {
            Thread.Sleep(500);
            try
            {
                log.Info("Clicked on User Profile list");
            }
            catch (Exception e)
            {
                log.Error("Unable to click user profile list " + Environment.NewLine + e);
            }
            log.Info("opened profile list");

            //check if profile button pressed
            try
            {
                Pages.Home_Page.ProfileButton.ClickOn();
                Thread.Sleep(500);
                log.Info("opened profile window");
            }
            catch (Exception e)
            {
                log.Error("Could not open profile window" + Environment.NewLine + e);
            }

            //fill the user details
            UserFirstName.Clear();
            UserFirstName.SendKeys(Constant.UserNameEdit);
            log.Info("Cleared and changed user name");
            UserLastName.Clear();
            UserLastName.SendKeys(Constant.UserLastnameEdit);
            log.Info("Cleared and changed user last name");
            Thread.Sleep(500);
            EditUserButton.ClickOn();
            log.Info("pressed on Edit user button");
        }