Exemplo n.º 1
0
        /// <summary>
        /// Fetch user details. If new user details meets requirements, register new user.
        /// </summary>
        /// <param name="sender">Object that sends the event</param>
        /// <param name="e">The event</param>
        private async void ConfirmBtnClicked(object sender, RoutedEventArgs e)
        {
            SetInputStrings();
            statusMessage.Text = "";
            if (InputUserName == string.Empty || InputFirstName == string.Empty || InputLastName == string.Empty || InputPassword == string.Empty || InputRePassword == string.Empty)
            {
                statusMessage.Text = "Please fill out all fields.";
                return;
            }
            else if (!InputUserName.All(Char.IsLetterOrDigit))
            {
                statusMessage.Text = "Username can only contain letters and numbers.";
                return;
            }
            else if (!InputFirstName.All(Char.IsLetter))
            {
                statusMessage.Text = "Your name can only contain letters.";
                return;
            }
            else if (!InputLastName.All(Char.IsLetter))
            {
                statusMessage.Text = "Your name can only contain letters.";
                return;
            }

            if (InputPassword != InputRePassword)
            {
                Console.Write("Password doesnt match");
                Console.ReadLine();
                statusMessage.Text = "Password does not match. Please re-enter your password";
                return;
            }
            await CheckUserNameAvailability();
        }
Exemplo n.º 2
0
        //loginpage actions
        //login to merchtool and passes common page object
        public MtHomePageObject Login()
        {
            InputUserName.EnterText("CORP_Webdriver");
            InputPassword.EnterText("ANapPqH<");
            BtnLogin.Click();

            Console.WriteLine("Varified input creds and logged into merchtool");
            return(new MtHomePageObject());
        }
Exemplo n.º 3
0
        //login page actions
        //login to shipping manager and passes common page object
        public SmCommonPageObject Login()
        {
            //username + pw + submit
            InputUserName.SendKeys("CORP_Webdriver");
            InputPassword.SendKeys("ANapPqH<");
            BtnLogin.Submit();

            Console.WriteLine("input credentials, logged into Shipping Manager");

            //return page object
            return(new SmCommonPageObject());
        }