public void GivenLoginUser(int p0)
        {
            var user = _users.ElementAt(p0);

            GivenNavigateToLoginForm();
            TimeWaiting.WaitSeconds(1);
            SetTextInTextBoxWithId("Email", $"{user.FirstName}.{user.LastName}@gmail.com");
            SetTextInTextBoxWithId("Password", DefaultPassword);
            WhenPressLogin();
        }
 public void WhenCreateSomeUsers()
 {
     GivenNavigateToMainPage();
     foreach (var user in _users)
     {
         GivenNavigateToRegisterForm();
         TimeWaiting.WaitSeconds(1);
         SetTextInTextBoxWithId("FirstName", user.FirstName);
         SetTextInTextBoxWithId("LastName", user.LastName);
         SetTextInTextBoxWithId("Email", $"{user.FirstName}.{user.LastName}@gmail.com");
         SetTextInTextBoxWithId("Password", DefaultPassword);
         SetTextInTextBoxWithId("ConfirmPassword", DefaultPassword);
         WhenPressRegister();
         WhenPressLogOff();
     }
 }
        public void GivenTransferToUserMoney(int p0, Decimal p1)
        {
            var TransactionAmountField = _browser.GetDriver().FindElement(By.Name("transactionamount"));

            Assert.IsNotNull(TransactionAmountField, $"Can't find amount field in page.");

            var recipientAutocompleteField = _browser.GetDriver().FindElement(By.Id("recipientAutocompleteField"));

            Assert.IsNotNull(recipientAutocompleteField, $"Can't find auto complete field in page.");

            recipientAutocompleteField.Click();
            for (int i = 0; i < 9; i++)
            {
                new Actions(_browser.GetDriver()).SendKeys(Keys.Tab).Perform();
                TimeWaiting.WaitSeconds(1);
            }
            var charsInUserName = _users.ElementAt(p0).FullName.ToCharArray();

            for (int i = 0; i < charsInUserName.Count() - 3; i++)
            {
                var charInUserName = charsInUserName[i];
                new Actions(_browser.GetDriver()).SendKeys(charInUserName.ToString()).Perform();
                TimeWaiting.WaitSeconds(1);
            }
            new Actions(_browser.GetDriver()).SendKeys(Keys.Down).Perform();
            TimeWaiting.WaitSeconds(1);
            new Actions(_browser.GetDriver()).SendKeys(Keys.Enter).Perform();
            TimeWaiting.WaitSeconds(1);
            new Actions(_browser.GetDriver()).SendKeys(Keys.Tab).Perform();
            TimeWaiting.WaitSeconds(1);
            new Actions(_browser.GetDriver()).SendKeys(p1.ToString().Replace(".", ",")).Perform();
            TimeWaiting.WaitSeconds(1);
            new Actions(_browser.GetDriver()).SendKeys(Keys.Tab).Perform();
            TimeWaiting.WaitSeconds(1);

            const string linkText = "Commit";

            _linkCliker.ClickOnLinkWithText(linkText);
            TimeWaiting.WaitSeconds(5);
        }
 public void WhenLoginUser(int p0)
 {
     GivenLoginUser(p0);
     TimeWaiting.WaitSeconds(2);
 }