示例#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();
 }
示例#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));
 }
示例#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);
            }
        }