コード例 #1
0
ファイル: LoginPage.cs プロジェクト: vguedez/TestAutomation
        public void InvalidLogIn()
        {
            Browser.WaitForElements(new List <IWebElement>()
            {
                UserName, UserPassword, LogInButton
            });
            UserName.SendKeys(Browser.getUser());
            UserPassword.SendKeys(PasswordGenerator.GetRandomPassword());

            LogInButton.Click();
        }
コード例 #2
0
        public void UserLogin(string email, string password)
        {
            WebDriverWait wait = new WebDriverWait(driver, TimeSpan.FromSeconds(30));

            wait.Until(ExpectedConditions.ElementToBeClickable(_typeEmail));
            UserEmail.Clear();
            UserEmail.SendKeys(email);
            Thread.Sleep(2000);
            wait.Until(ExpectedConditions.ElementToBeClickable(_typePassword));
            UserPassword.Clear();
            UserPassword.SendKeys(password);
        }
コード例 #3
0
 public DashBoardPage Loging(string username, string pass)
 {
     Console.WriteLine("Find for the form to login");
     Utils.FindElementVisible(By.Id("txtUsername"));
     Console.WriteLine("Fill Login and password with values: " + username + " and " + pass);
     UserName.SendKeys(username);
     UserPassword.Clear();
     UserPassword.SendKeys(pass);
     Console.WriteLine("Click on Loging button");
     ButtonLogin.Click();
     return(new DashBoardPage());
 }
コード例 #4
0
ファイル: LoginPage.cs プロジェクト: vguedez/TestAutomation
        public void LogIn()
        {
            Browser.WaitForElements(new List <IWebElement>()
            {
                UserName, UserPassword, LogInButton
            });
            UserName.Clear();
            UserPassword.Clear();
            UserName.SendKeys(Browser.getUser());
            UserPassword.SendKeys(Browser.getPassword());

            LogInButton.Click();
        }
コード例 #5
0
 public void Submit(string username, string password)
 {
     UserEmail.SendKeys(username);
     UserPassword.SendKeys(password);
     SignIn.Click();
 }