public void Register(string planType)
            {
                var d = new Data.AccountInfo();


                EmailField.SendKeys(planType + d.Email);
                EmailConfirmField.SendKeys(planType + d.Email);
                UsernameField.SendKeys(planType + d.username);
                PasswordField.SendKeys(d.Password);
                ConfirmPasswordField.SendKeys(d.Password);
                SelectElement SecurityQuestionDrop = new SelectElement(SecurityQuestionDropdown);

                SecurityQuestionDrop.SelectByText(d.Securityselection);
                SecurityQuestionAnswer.SendKeys(d.Securityanswer);
                NextButton.Click();

                if (this._driver.Url == @"https://betacustomeraccess.myfloridaprepaid.com/enrollment/accountowner.aspx")
                {
                    Tests.successCount++;
                    Console.WriteLine("User: "******" created]");
                }
                else
                {
                    Tests.failCount++;
                    Console.WriteLine("[FAIL] [RUN #" + Tests.runCount + "]" + "[User: "******" not created]");
                }
            }
예제 #2
0
        public void Login(String username, String password)
        {
            bool isLoggedIn = false;

            while (!isLoggedIn)
            {
                if (!isLoggingIn)
                {
                    try
                    {
                        isLoggingIn = true;
                        Thread.Sleep(1000);
                        UsernameField.SendKeys(username);
                        PasswordField.SendKeys(password);
                        LoginButton.Click();

                        if (Driver.WebDriver.PageSource.Contains("CAS Authentication failed!"))
                        {
                            CasAuthFailRedirect.Click();
                        }
                        isLoggedIn = true;
                    } catch (Exception e)
                    {
                    } finally
                    {
                        isLoggingIn = false;
                    }
                }
                else
                {
                    Thread.Sleep(new Random().Next(1, 99) * 100);
                }
            }
        }
예제 #3
0
 public void CheckInvalidLogin(string username, string password)
 {
     UsernameField.SendKeys(username);
     PasswordField.SendKeys(password);
     FailedBtnSignIn.Click(false);
     ErrorLoginMessage.WaitForElementVisibleAndEnabled();
 }
예제 #4
0
 // Login Method takes username and password and click on Login button
 // Waiting for the overlay to disappear
 public void LoginMethod(string username, string password)
 {
     UsernameField.SendKeys(username);
     PasswordField.SendKeys(password);
     Loginbtn.Click();
     _driver.ExplicitWait(10, "XPath", "/html/body/div[4]/h4");
     _driver.ExplicitWaitInvisible(10, "XPath", "/html/body/div[4]/h4");
 }
예제 #5
0
        public MyBeazleyHomePage SuccessfullLogin()
        {
            ClearLoginInputs();
            UsernameField.SendKeys("Bluefin User 1");
            PasswordField.SendKeys("beazley02");

            return(BtnSignIn.Click() as MyBeazleyHomePage);
        }
예제 #6
0
        public AccountsHomePage SignupValid(User user)
        {
            UsernameField.SendKeys(user.name);
            FullnameField.SendKeys(user.fullName);
            EmailField.SendKeys(user.email);
            PasswordField.SendKeys(user.password);
            Password2Field.SendKeys(user.password);

            SignupButton.Click();

            WaitForPageToLoad();

            return(new AccountsHomePage(driver));
        }
예제 #7
0
        public AccountsLoginPage LoginAsInvalid(User invalidUser)
        {
            if (!IsDisplayed(By.Id("user_name"), 10))
            {
                throw new ElementNotVisibleException("cannot find login field");
            }

            UsernameField.SendKeys(invalidUser.name);
            PasswordField.SendKeys(invalidUser.password);
            LoginButton.Click();

            WaitForPageToLoad();

            return(new AccountsLoginPage(driver));
        }
예제 #8
0
        public string FillLoginForm(string username, string password, string repeatPassword)
        {
            UsernameField.Clear();
            UsernameField.SendKeys(username);
            PasswordField.Clear();
            PasswordField.SendKeys(password);
            RepeatPasswordField.Clear();
            RepeatPasswordField.SendKeys(repeatPassword);
            LoginButton.Click();

            var appAlert = _driver.SwitchTo().Alert();

            var tempstr = appAlert.Text;

            appAlert.Accept();
            return(tempstr);
        }
예제 #9
0
        public void InputUsername()
        {
            driver.SwitchTo().Window(driver.WindowHandles.Last());

            UsernameField.SendKeys("angular");
        }
예제 #10
0
 public void Login(String username, String password)
 {
     UsernameField.SendKeys(username);
     PasswordField.SendKeys(password);
     SignInButton.Click();
 }