Exemplo n.º 1
0
        public void GoToJournalLoginPage(string name)
        {
            var page = new MainPage(driver);

            page.GoToJournalMainPage(name);
            LoginLink.Click();
        }
Exemplo n.º 2
0
        public void OpenLoginPage()
        {
            var txt = LoginLink.Text;

            DriverWait.Until(ExpectedConditions.TextToBePresentInElement(LoginLink, "Log"));
            LoginLink.Click();
        }
Exemplo n.º 3
0
        /// <summary>
        /// Logs in a user.
        /// First navigates to the site home page, clicks on the login link, then enters the users username and password and clicks login.
        /// </summary>
        /// <param name="name">The username for the user.</param>
        /// <param name="password">The password for the user.</param>
        public void LoginUser(string name, string password, bool expectToLogin, int portalId)
        {
            var user        = UserController.GetUserByName(portalId, name);
            var regLinkText = RegisterLink.Text;

            if (regLinkText == user.DisplayName)
            {
                return;
            }

            if (LoginLink.Text == "Logout")
            {
                LoginLink.ClickNoWait();
                IEInstance.WaitUntilContainsText("Login");
            }

            LoginLink.Click();
            UserNameField.Value        = name;
            PasswordField.Value        = password;
            RememberMeCheckBox.Checked = true;
            LoginButton.ClickNoWait();
            if (expectToLogin)
            {
                IEInstance.WaitUntilContainsText("Logout");
            }
        }
Exemplo n.º 4
0
 public void Login(string username, string password)
 {
     LoginLink.Click();
     UsernameInput.SendKeys(username);
     PasswordInput.SendKeys(password);
     LoginButton.Click();
 }
Exemplo n.º 5
0
        /// <summary>
        /// Logs in a user.
        /// Clicks on the login link, then enters the users username and password and clicks login.
        /// This method doesn't navigate to the site home page first.
        /// </summary>
        /// <param name="name"></param>
        /// <param name="password"></param>
        public void LoginUserNoGoTo(string name, string password)
        {
            LoginLink.Click();

            UserNameField.Value = name;
            PasswordField.Value = password;

            LoginButton.Click();
        }
    //Role
    //[FindsBy(How = How.Id, Using = "ctl19_rptDashBoard_ctl01_hypPageURL")]
    //public IWebElement Role { get; set; }
    //User
    //[FindsBy(How = How.Id, Using = "ctl19_rptDashBoard_ctl02_hypPageURL")]
    //public IWebElement User { get; set; }
    public void LogIn(string Username, string Password)
    {
        Browser.MaximizeWindow();
        IWebElement UserNameLink = Browser.WaitForElement(By.Id("ctl14_UserName"), 15);

        UserNameLink.Click();
        UserNameLink.Clear();
        UserNameLink.SendKeys(Username);
        PasswordLink.Click();
        PasswordLink.Clear();
        PasswordLink.SendKeys(Password);
        LoginLink.Click();
    }
Exemplo n.º 7
0
        /// <summary>
        /// Enters a username and password into the login module.
        /// Doesn't login the user after entering these values.
        /// </summary>
        /// <param name="name">The username.</param>
        /// <param name="password">The password.</param>
        public void EnterUserLogin(string name, string password)
        {
            if (LoginLink.Text == "Logoff")
            {
                LoginLink.ClickNoWait();
                IEInstance.WaitForComplete();
            }

            LoginLink.Click();
            System.Threading.Thread.Sleep(1500);

            UserNameField.Value = name;
            PasswordField.Value = password;
        }
Exemplo n.º 8
0
        /// <summary>
        /// Enters a username and password into the login module.
        /// Doesn't login the user after entering these values.
        /// </summary>
        /// <param name="name">The username.</param>
        /// <param name="password">The password.</param>
        public void EnterUserLogin(string name, string password)
        {
            IEInstance.GoTo(SiteUrl);
            System.Threading.Thread.Sleep(1500);
            if (LoginLink.Text != "Login")
            {
                return;
            }

            LoginLink.Click();
            System.Threading.Thread.Sleep(1500);

            UserNameField.Value = name;
            PasswordField.Value = password;
        }
Exemplo n.º 9
0
        /// <summary>
        /// Logs in a user.
        /// First navigates to the site home page, clicks on the login link, then enters the users username and password and clicks login.
        /// </summary>
        /// <param name="name">The username for the user.</param>
        /// <param name="password">The password for the user.</param>
        public void LoginUser(string name, string password)
        {
            IEInstance.GoTo(SiteUrl);
            System.Threading.Thread.Sleep(1500);
            if (LoginLink.Text != "Login")
            {
                return;
            }

            LoginLink.Click();
            System.Threading.Thread.Sleep(1500);

            UserNameField.Value = name;
            PasswordField.Value = password;

            LoginButton.ClickNoWait();
            System.Threading.Thread.Sleep(2500);
        }
Exemplo n.º 10
0
 public void ClickOnLoginLink()
 {
     LoginLink.Click();
 }