public SignedinPage LoginToApplication(string username, string password)
 {
     UserNameElement.SendKeys(username);
     PasswordElement.SendKeys(password);
     LoginButtonElement.Submit();
     return(new SignedinPage(this.driver));
 }
Ejemplo n.º 2
0
 //Passed provided user credentials into appropreate fields, then attempts log in
 public void LogIn(string username, string pwd)
 {
     Helper.WaitForElement(By.CssSelector("#login-form > fieldset > label:nth-child(4) > input"));
     UsernameElement.SendKeys(username);
     PasswordElement.SendKeys(pwd);
     LoginButton.Click();
 }
Ejemplo n.º 3
0
 public void EnterData(string username, string password)
 {
     UsernameElement.Clear();
     PasswordElement.Clear();
     UsernameElement.SendKeys(username);
     PasswordElement.SendKeys(password);
 }
Ejemplo n.º 4
0
 public void TypePassword(string password)
 {
     //IWebElement passwordElement =(IWebElement)((IJavaScriptExecutor)_driver).ExecuteScript("return document.getElementsByName(\"pwd\")[0];");
     PasswordElement.SendKeys(password);
     //_driver.FindElement(_password).SendKeys(Keys.Enter);
     //_driver.FindElement(_password).SendKeys(Keys.Clear);
 }
Ejemplo n.º 5
0
        public EAPageObject Login(string userName, string password)
        {
            // UserName
            UserNameElement.EnterText(userName);
            // Password
            PasswordElement.EnterText(password);
            // Click submit button
            ButtonLoginElement.ClickElement();

            // Return the page object
            return(new EAPageObject());
        }
Ejemplo n.º 6
0
        /// <summary>
        /// Enters the password.
        /// </summary>
        /// <param name="password">The password.</param>
        /// <returns></returns>
        public virtual _CreateOrUpdateInfoComponent EnterPassword(string password)
        {
            PasswordElement.SetValue(password);
            var changePasswordEl = ChangePasswordElement;

            if (changePasswordSelector != null)
            {
                WrappedDriver
                .Wait(TimeSpan.FromSeconds(2))
                .UntilPageReloads(changePasswordEl, e => e.Click());
            }

            return(pageObjectFactory.PrepareComponent(this));
        }
Ejemplo n.º 7
0
 private void SetPasswordInputClear(string data)
 {
     PasswordElement.Click();
     PasswordElement.Clear();
     PasswordElement.SendKeys(data);
 }