public void GivenUserFillsPassword(string password) { _context.Grid = PromoCardRegistrationPage.FindCreateAccountForm(); var passwordFields = _context.Grid.FindElements(Password); //Type password passwordFields.First().SendKeys(password); //Repeat password passwordFields.Last().SendKeys(password); }
public void GivenUserFillsPersonalDetails(UIUserPersonalDetails table) { _context.Grid = PromoCardRegistrationPage.FindPersonalDetailsForm(); _context.Grid .SendText(FirstName, table.FirstName) .SendText(LastName, table.LastName) .SendText(DOB, DataBuilderHelper.GenerateDob()) .SendText(Email, _context.Email = DataBuilderHelper.GenerateEmail()); SearchElementByCss(Citizenship) .FindElements(By.CssSelector("option")) .SingleOrDefault(it => it.Text.Contains(table.Country)).Click(); }
public void GivenUserLandsOn(string location) { switch (location) { case "Card Registration": DriverManager.GetWebDriver().Navigate() .GoToUrl(TestConfiguration.Current.LandingPage + "/card_registration.html"); CaptchaAppears(); _context.Grid = PromoCardRegistrationPage.FindCardDetailsForm(); break; default: throw new Exception("No any case -branch for " + location); } }
public void GivenUserActivationDetails(Table table) { _context.Grid = PromoCardRegistrationPage.FindActivationDetailsForm(); var set = table.CreateDynamicSet().ToList(); SearchElementByCss(Country) .FindElements(By.CssSelector("option")) .SingleOrDefault(it => it.Text.Contains(set[0].Country)).Click(); _context.Grid .SendText(State, set[0].State) .SendText(City, set[0].City) .SendText(Index, set[0].Index.ToString()) .SendText(Address, set[0].Address) .SendText(SecretName, set[0].SecretName) .SendText(SecretDate, set[0].SecretDate.ToString()) .SendText(SecretPlace, set[0].SecretPlace) .SendText(SecretCode, set[0].SecretCode.ToString()); CommonComponentSteps.MakeScreenshot(); }
public void ThenUserGetsMessage(string msg) { _context.Grid = PromoCardRegistrationPage.FindSuccessRegistrationForm(); _context.Grid.WaitElementWithText(SuccessRegistrationForm + SuccessMessage, msg); CommonComponentSteps.MakeScreenshot(); }