Example #1
0
 public void SignIn(string username, string password)
 {
     SignInElement.Click();
     this.WaitUntilDisplayed(UsernameFieldElement);
     this.WaitUntilDisplayed(UserpasswordElement);
     this.FillFields(username, password);
     RememberLoginElement.Click();
     LoginButtonElement.Click();
 }
Example #2
0
 public MainPage SignIn(BasePage bp, string username, string password)
 {
     SignInElement.Click();
     this.WaitUntilDisplayed(UsernameFieldElement);
     this.WaitUntilDisplayed(UserpasswordElement);
     this.FillFields(username, password);
     RememberLoginElement.Click();
     LoginButtonElement.Click();
     return(new MainPage(bp));
 }
Example #3
0
        /// <summary>
        /// Clicks the login button.
        /// </summary>
        /// <param name="success"></param>
        /// <param name="error"></param>
        public virtual void ClickLogin(Action <HomePage> success, Action <LoginPage> error)
        {
            LoginButtonElement.Click();

            if (WrappedDriver.Url == Uri.ToString())
            {
                error(this);
            }
            else
            {
                var homePage = pageObjectFactory.PreparePage <HomePage>();
                success(homePage);
            }
        }