public void Register(string planType) { var d = new Data.AccountInfo(); EmailField.SendKeys(planType + d.Email); EmailConfirmField.SendKeys(planType + d.Email); UsernameField.SendKeys(planType + d.username); PasswordField.SendKeys(d.Password); ConfirmPasswordField.SendKeys(d.Password); SelectElement SecurityQuestionDrop = new SelectElement(SecurityQuestionDropdown); SecurityQuestionDrop.SelectByText(d.Securityselection); SecurityQuestionAnswer.SendKeys(d.Securityanswer); NextButton.Click(); if (this._driver.Url == @"https://betacustomeraccess.myfloridaprepaid.com/enrollment/accountowner.aspx") { Tests.successCount++; Console.WriteLine("User: "******" created]"); } else { Tests.failCount++; Console.WriteLine("[FAIL] [RUN #" + Tests.runCount + "]" + "[User: "******" not created]"); } }
public void Login(params string[] credentials) { EmailField.Clear(); EmailField.SendKeys(credentials.First()); PasswordField.Clear(); PasswordField.SendKeys(credentials.Last()); LoginButton.Click(); }
public void EnterLoginDetails(string email, string password) { EmailField.SendKeys(email); EmailNextButton.Click(); SeleniumHelpers.WaitForElementToBeVisible(By.Id("login-passwd")); PasswordField.SendKeys(password); PasswordNextButton.Click(); }
public void InputContactInformation(String address, String city, String stateCode, String zip, String contactPhone, String emailAddress) { AddressField.SendKeys(address); CityField.SendKeys(city); new SelectElement(StateSelect).SelectByValue(stateCode); ZipField.SendKeys(zip); ContactPhoneNumber.SendKeys(contactPhone); EmailField.SendKeys(emailAddress); NextButton.Click(); }
public void VerifyLoginErrorMessageWithInvalidEmailAndEmptyPasswordField() { string expectedResult = "Invalid Email or password."; EmailField.SendKeys("*****@*****.**"); RemmemberMeCheckBox.Click(); SignInButton.Click(); string actualResult = ErrorMessage.Text; Assert.AreEqual(expectedResult, actualResult); }
public void EnterEmailField(string email) { if (GetTextEmailField() == null) { EmailField.SendKeys(email); } else { ClickEmailField(); } }
public void FillFormWithEmail(AutomationPracticeFormModel user) { FirstNameField.SendKeys(user.FirstName); LastNameField.SendKeys(user.LastName); EmailField.SendKeys(user.Email); PasswordField.SendKeys(user.Password); AddressField.SendKeys(user.Address); CityField.SendKeys(user.City); PostalCode.SendKeys(user.PostalCode); MobilePhone.SendKeys(user.MobilePhone); }
public void CreateAccount(string nume, string email, string telefon, string adresa, string password) { NumeField.Click(); NumeField.SendKeys(nume); EmailField.SendKeys(email); TelefonField.SendKeys(telefon); AdresaField.SendKeys(adresa); ParolaField.SendKeys(password); RepetaParolaField.SendKeys(password); InscriereButton.Click(); }
public void VerifyErrorMessageWithValidEmailAndInvalidPassword() { string expectedResult = "Invalid Email or password."; EmailField.SendKeys("*****@*****.**"); PasswordField.SendKeys("wrongPassword"); RemmemberMeCheckBox.Click(); SignInButton.Click(); string actualResult = ErrorMessage.Text; Assert.AreEqual(expectedResult, actualResult); }
public void LoginWithValidEmailAndPassword() { string expectedResult = "Ultimate QA"; EmailField.SendKeys("*****@*****.**"); PasswordField.SendKeys("123456789"); RemmemberMeCheckBox.Click(); SignInButton.Click(); string actualResult = Driver.Title; Assert.AreEqual(expectedResult, actualResult); }
public void VerifyErrorMessageWithInvalidEmailAndValidPassword() { string expectedResult = "Invalid Email or password."; EmailField.SendKeys("*****@*****.**"); PasswordField.SendKeys("123456789"); RemmemberMeCheckBox.Click(); SignInButton.Click(); string actualResult = ErrorMessage.Text; Assert.AreEqual(expectedResult, actualResult); }
public void InputContactInformation(String address, String city, String stateCode, String zip, String contactPhone, String emailAddress) { AddressField.SendKeys(address); CityField.SendKeys(city); StateField.SendKeys(stateCode); ZipField.SendKeys(zip); ContactPhoneNumber.SendKeys(contactPhone); EmailField.SendKeys(emailAddress); if (IsElementDisplayed(ConfirmEmailField)) { ConfirmEmailField.SendKeys(emailAddress); } NextButton.Click(); }
public AccountsHomePage SignupValid(User user) { UsernameField.SendKeys(user.name); FullnameField.SendKeys(user.fullName); EmailField.SendKeys(user.email); PasswordField.SendKeys(user.password); Password2Field.SendKeys(user.password); SignupButton.Click(); WaitForPageToLoad(); return(new AccountsHomePage(driver)); }
public void CreateAccountDto(UserInfoDto user) { var NameValue = user.GetType().GetRuntimeProperty("Name").GetValue(user); if (NameValue != null) { NumeField.Click(); NumeField.SendKeys(NameValue.ToString()); } var EmailValue = user.GetType().GetRuntimeProperty("Email").GetValue(user); if (EmailValue != null) { if (EmailValue.Equals("NewUniqueEmail")) { string Timestamp = System.DateTime.Now.ToString("MM-dd-yyyy-HH-mm-ss"); NewUniqueEmail = $"AD_{Timestamp}@test.com"; EmailField.SendKeys(NewUniqueEmail); } else { EmailField.SendKeys(EmailValue.ToString()); } } var PhoneValue = user.GetType().GetRuntimeProperty("Phone").GetValue(user); if (PhoneValue != null) { TelefonField.SendKeys(PhoneValue.ToString()); } var AddressValue = user.GetType().GetRuntimeProperty("Address").GetValue(user); if (AddressValue != null) { AdresaField.SendKeys(AddressValue.ToString()); } var PasswordValue = user.GetType().GetRuntimeProperty("Password").GetValue(user); if (PasswordValue != null) { ParolaField.SendKeys(PasswordValue.ToString()); RepetaParolaField.SendKeys(PasswordValue.ToString()); } InscriereButton.Click(); }
public ActivationRequestedPage RegisterNewUser() { NavigateToPage(); ClearForm(); UserNameField.SendKeys(TestUser.Username + "2"); PasswordField.SendKeys(TestUser.Password); RetypePasswordField.SendKeys(TestUser.Password); EmailField.SendKeys("*****@*****.**"); SignUpButton.Click(); return(new ActivationRequestedPage(WebDriver)); }
public RegisterPage RegisterUsingAlreadyTakenEmail() { NavigateToPage(); ClearForm(); UserNameField.SendKeys(TestUser.Username + "2"); PasswordField.SendKeys(TestUser.Password); RetypePasswordField.SendKeys(TestUser.Password); EmailField.SendKeys(TestUser.Email); SignUpButton.Click(); return(this); }
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 override AbstractPage SearchForTerms(string src) // { // throw new NotImplementedException(); // } // public override int CountSearchResults() // { // throw new NotImplementedException(); // } //SearchPage //AbstractPage public void LogInGoogle(User user) { EmailField = WaitForElementOnPage(By.CssSelector("#identifierId")); EmailField.SendKeys(user.USER_EMAIL); Thread.Sleep(500); ((IJavaScriptExecutor)_driver).ExecuteScript("arguments[0].click();", MovingForwardBtn); Thread.Sleep(1000); PassField = WaitForElementOnPage(By.CssSelector(".I0VJ4d > div:nth-child(1) > input")); PassField.SendKeys(user.USER_PASSWD); Thread.Sleep(500); ((IJavaScriptExecutor)_driver).ExecuteScript("arguments[0].click();", FinishLoginBtn); //auto-open of search page // Thread.Sleep(TimeSpan.FromSeconds(20)); // return new SearchPage(driver).OpenPage(); }
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 bool Login(string email, string password) { EmailField.SendKeys(email); test.Log(Status.Pass, $"Enter '{email}' in the Email field "); PasswordField.SendKeys(password); test.Log(Status.Pass, $"Enter '{password}' in the Password field"); ContinueButton.Click(); test.Log(Status.Pass, "Click the 'Continue' Button"); Thread.Sleep(3000); if (new FarmerDashboardPage(driver, test).IsLogOutBtnFound()) { return(true); } return(false); }
//<summary> ///SignIn /// </summary> public void LogInToUserAccount() { EmailField.SendKeys("*****@*****.**"); PassowrdField.SendKeys("Pass@word1"); LoginButton.Click(); }
public void Login(LoginModel loginModel) { EmailField.SendKeys(loginModel.Email); PasswordField.SendKeys(loginModel.Password); LoginButton.Click(); }
public void FillInEmailField(string email) { EmailField.Clear(); EmailField.SendKeys(email); }
public void SendKeysInEmailField(string emailId) { EmailField.SendKeys(emailId); }
/// <summary>Method for set mail or phone number</summary> public void SetMail(string mail) { EmailField.SendKeys(mail); }
public void ValidateSignIn(UserDto user) { Helper.ScrollToSeeTheRightButton(_driver, CreateAccountButton); EmailField.Click(); var emailAddressValue = user.GetType().GetRuntimeProperty("emailAddress").GetValue(user); if (emailAddressValue != null) { EmailField.SendKeys(emailAddressValue.ToString()); } CreateAccountButton.Click(); Thread.Sleep(4000); Helper.ScrollToSeeTheRightButton(_driver, PersonalInformationTitleRadioButton); PersonalInformationTitleRadioButton.Click(); PersonalInformationFirstNameField.Click(); var firstNameValue = user.GetType().GetRuntimeProperty("firstName").GetValue(user); if (firstNameValue != null) { PersonalInformationFirstNameField.SendKeys(firstNameValue.ToString()); } PersonalInformationLastNameField.Click(); var lastNameValue = user.GetType().GetRuntimeProperty("lastName").GetValue(user); if (lastNameValue != null) { PersonalInformationLastNameField.SendKeys(lastNameValue.ToString()); } PersonalInformationPasswordField.Click(); var passwordValue = user.GetType().GetRuntimeProperty("password").GetValue(user); if (passwordValue != null) { PersonalInformationPasswordField.SendKeys(passwordValue.ToString()); } SelectDayBox.Click(); SelectDay.Click(); SelectMonthBox.Click(); SelectMonth.Click(); SelectYearsBox.Click(); SelectYear.Click(); Helper.ScrollToSeeTheRightButton(_driver, AdressAddressField); Thread.Sleep(1000); AdressAddressField.Click(); var adressAddressField = user.GetType().GetRuntimeProperty("address").GetValue(user); if (adressAddressField != null) { AdressAddressField.SendKeys(adressAddressField.ToString()); } Thread.Sleep(1000); AdressCityField.Click(); var adressCityField = user.GetType().GetRuntimeProperty("city").GetValue(user); if (adressCityField != null) { AdressCityField.SendKeys(adressCityField.ToString()); } Thread.Sleep(1000); AdressStateDropdown.Click(); AdressState.Click(); Thread.Sleep(1000); AdressPostcodeField.Click(); var adressPostcodeField = user.GetType().GetRuntimeProperty("postcode").GetValue(user); if (adressPostcodeField != null) { AdressPostcodeField.SendKeys(adressPostcodeField.ToString()); } Thread.Sleep(1000); AdressMobilePhoneField.Click(); var adressMobilePhoneField = user.GetType().GetRuntimeProperty("mobilePhone").GetValue(user); if (adressMobilePhoneField != null) { AdressMobilePhoneField.SendKeys(adressMobilePhoneField.ToString()); } Thread.Sleep(1000); AdressAliasField.Clear(); var adressAliasField = user.GetType().GetRuntimeProperty("alias").GetValue(user); if (adressAliasField != null) { AdressAliasField.SendKeys(adressAliasField.ToString()); } Helper.ScrollToSeeTheRightButton(_driver, RegisterButton); RegisterButton.Click(); }
/// <summary> /// Enter a value in the 'Email' field on the 'Edit User' page /// </summary> /// <param name="email">The email to be entered</param> public void EnterEmail(string email) { EmailField.WaitAndClick(_driver); EmailField.SendKeys(email); }