Example #1
0
        /*
         * Method validates the create account fields
         */
        public void Validates_Fields_CreateAccount()
        {
            try
            {
                Create_Account_Button.Click();
                Utils.VisibleElement("Validates the Email Field is visible", Email);
                Utils.VisibleElement("Validates the Password Field is visible", Password);
                Utils.Enable("Validates the Next Button is Disable", Next_Button);
                Email.Click();
                Email.SendKeys(VALUE_INCORRECT_EMAIL);                                        //Enter text incorrect
                Password.Click();
                Utils.VisibleElement("Validates the Error message is visible", ErrorMessage); //Validate the Error message is visible
                Utils.Asserts("Validates the password field is not Focusable", "false", Utils.Focus_Element("et_account_password"));
                Utils.Enable("Validates the Next Button is Disable", Next_Button);

                Password.Click();
                Utils.Asserts("Validates the password field is Focusable", "true", Utils.Focus_Element("et_account_password"));
                Password.SendKeys(VALUE_PASS);
                Utils.HideKeyboard();
                Utils.Enable("Validates the Next Button is Disable", Next_Button);
                HidePassword.Click();
                Utils.Asserts("Validate the Password Hide correct", VALUE_HIDE_PASS, Utils.Get_Attribute(Password, "text"));
            }
            catch (Exception error)
            {
                Console.WriteLine("This Method Validates_Fields_CreateAccount could not be execute", error);
            }
        }
Example #2
0
        static void Main(string[] args)
        {
            MainMenu main = new MainMenu();

            Console.ForegroundColor = ConsoleColor.DarkCyan;
            LoginSystem  loginSystem = new LoginSystem();
            HidePassword hide = new HidePassword();
            string       login, password = "";

            Console.WriteLine("\t\t\t\tPizzaHUB" + "\nChoose action:" + "\n1.Login" + "\n2.Register");

            int choose = 0;

            while (choose != 1 && choose != 2)
            {
                if (int.TryParse(Console.ReadLine(), out choose))
                {
                    switch (choose)
                    {
                    case 1:
                        Console.Clear();
                        Console.ForegroundColor = ConsoleColor.Green;
                        Console.WriteLine("\t\t\tLogin\nLogin:"******"Password:"******"Введите адекватное число!");
                }
                else
                {
                    Console.WriteLine("Введите адекватное число!");
                }
            }
            Console.ReadLine();
        }