예제 #1
0
 public HomePage FillLoginFormAndSubmit(string login, string password)
 {
     LoginField.SendKeys(login);
     PasswordField.SendKeys(password);
     SubmitButton.Submit();
     return(new HomePage());
 }
예제 #2
0
 public DashboardPage LoginOnPage(string login, string password)
 {
     LoginField.SendKeys(login);
     PasswordField.SendKeys(password);
     SubmitButton.Click();
     return(new DashboardPage(Driver));
 }
예제 #3
0
 public LoginPage FillLoginFormWithIncorrectDataAndSubmit(string login, string password)
 {
     LoginField.SendKeys(login);
     PasswordField.SendKeys(password);
     SubmitButton.Submit();
     return(new LoginPage());
 }
예제 #4
0
 public HomePage LoginAs(string username, string password, string domain = "mail.ru")
 {
     LoginField.SendKeys(username);
     PasswordField.SendKeys(password);
     SelectDomain(domain);
     LoginButton.Click();
     return(new HomePage(GetDriver()));
 }
예제 #5
0
 public void LogIn(String login, String password, WebDriverWait wait)
 {
     wait.Until((d) => IsLoginPageOpened(d));
     LoginField.SendKeys(login);
     PasswordField.SendKeys(password);
     LoginButton.Click();
     wait.Until((d) => MainPage.IsMainPageOpened(d));
 }
예제 #6
0
 public MailMainMenu Login(User user)
 {
     LoginField.SendKeys(user.Login);
     SubmitButton.Click();
     PasswordField.SendKeys(user.Password);
     SubmitButton.Click();
     return(new MailMainMenu(driver));
 }
예제 #7
0
 public WellsFargo LoginOld(string userId, string password)
 {
     LoginField.Click();
     LoginField.SendKeys(userId);
     PasswordField.Click();
     PasswordField.SendKeys(password);
     LoginButton.Click();
     return(this);
 }
예제 #8
0
        public HomePage LoginUsingJSClick(string username, string password, string domain = "mail.ru")
        {
            LoginField.SendKeys(username);
            PasswordField.SendKeys(password);
            SelectDomain(domain);
            IJavaScriptExecutor js = GetDriver() as IJavaScriptExecutor;

            js.ExecuteScript("document.getElementById('mailbox__auth__button').click()");
            return(new HomePage(GetDriver()));
        }
예제 #9
0
 public RegistrationPage FillAndSubmitRegistrationForm(string login, string email, string name, string surname, string phone, string password, string confirmPassword)
 {
     LoginField.SendKeys(login);
     EmailField.SendKeys(email);
     NameField.SendKeys(name);
     SurnameField.SendKeys(surname);
     PhoneField.SendKeys(phone);
     PasswordField.SendKeys(password);
     RepeatPasswordField.SendKeys(confirmPassword);
     TestDataHelper.ClickRandomDate(BirthDateField);
     UnitField.Click();
     EridCells = Factory.TryFindElements(By.XPath(RegistrationPageLocators.GridCellsLocator));
     TestDataHelper.ClickRandomGridCell(EridCells);
     ConfirmationButton.Click();
     return(new RegistrationPage());
 }
        public BasePageObject Login(string username, string password, ExpectedPageObject expectedPageObject)
        {
            LoginField.SendKeys(username);
            PasswordField.SendKeys(password);
            CheckBox.Click();

            SubmitButton.Click();

            if (expectedPageObject == ExpectedPageObject.AccountSummaryPageObject)
            {
                return(new AccountSummaryPageObject(Driver));
            }
            if (expectedPageObject == ExpectedPageObject.OnlineStatementsPageObject)
            {
                return(new OnlineStatementsPageObject(Driver));
            }

            throw new ArgumentException("expectedPageObject");
        }
예제 #11
0
 public RegistrationPage aa(string birthDate, params string[] vs)
 {
     foreach (var item in vs)
     {
         LoginField.SendKeys(item);
         EmailField.SendKeys(item);
         NameField.SendKeys(item);
         SurnameField.SendKeys(item);
         PhoneField.SendKeys(item);
         PasswordField.SendKeys(item);
         RepeatPasswordField.SendKeys(item);
     }
     TestDataHelper.ClickRandomDate(BirthDateField);
     UnitField.Click();
     EridCells = Factory.TryFindElements(By.XPath(RegistrationPageLocators.GridCellsLocator));
     TestDataHelper.ClickRandomGridCell(EridCells);
     ConfirmationButton.Click();
     return(new RegistrationPage());
 }
        public void StartWork()
        {
            bool flag = true;

            while (flag)
            {
                if (System.DateTime.Now.Hour == 8 && System.DateTime.Now.Minute == 17)
                {
                    LoginField = driver.FindElement(By.Id("username"));
                    LoginField.Click();
                    System.Threading.Thread.Sleep(541);
                    LoginField.SendKeys("fpm.lihovec");
                    System.Threading.Thread.Sleep(432);
                    PassField = driver.FindElement(By.Id("password"));
                    PassField.Click();
                    PassField.SendKeys("1823402");
                    System.Threading.Thread.Sleep(734);
                    SearchInput = driver.FindElement(By.Id("loginbtn"));
                    SearchInput.Click();
                    System.Threading.Thread.Sleep(1231);
                    flag = false;
                }
            }
        }
예제 #13
0
 public void FillLoginForm(string login, string password)
 {
     LoginField.SendKeys(login);
     PasswordField.SendKeys(password);
     bool a = SubmitButton.Enabled;
 }
예제 #14
0
 public LoginPage InputLogin(string login)
 {
     LoginField.Click();
     LoginField.SendKeys(login);
     return(this);
 }
예제 #15
0
 public void Login(string name, string pass)
 {
     LoginField.SendKeys(name);
     PasswordField.SendKeys(pass);
     LoginButton.Click();
 }
예제 #16
0
 public void enterUserName(string username)
 {
     LoginField.SendKeys(username);
 }
예제 #17
0
 public void Login(string login, string password)
 {
     LoginField.SendKeys(login);
     PasswordField.SendKeys(password);
     LoginButton.Click();
 }
예제 #18
0
 public void InputLogin(string login)
 {
     LoginField.Click();
     LoginField.SendKeys(login);
 }