public SignedinPage LoginToApplication(string username, string password)
 {
     UserNameElement.SendKeys(username);
     PasswordElement.SendKeys(password);
     LoginButtonElement.Submit();
     return(new SignedinPage(this.driver));
 }
예제 #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();
 }
예제 #3
0
 public void EnterData(string username, string password)
 {
     UsernameElement.Clear();
     PasswordElement.Clear();
     UsernameElement.SendKeys(username);
     PasswordElement.SendKeys(password);
 }
예제 #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);
 }
예제 #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());
        }
예제 #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));
        }
예제 #7
0
 private void SetPasswordInputClear(string data)
 {
     PasswordElement.Click();
     PasswordElement.Clear();
     PasswordElement.SendKeys(data);
 }