public void EnterUserDetail() { SignInBtn.Click(); EmailAddress.SendKeys("*****@*****.**"); BasePage.driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(10); CreateAcccontBtn.Click(); // AC 4.1 create user account Gender.Click(); FirstName.SendKeys("Nadeem"); LastName.SendKeys("Digital"); Password.SendKeys("123qwe"); SelectElement DropDay = new SelectElement(Day); DropDay.SelectByValue("10"); SelectElement DropMonth = new SelectElement(Month); DropMonth.SelectByValue("9"); SelectElement DropYear = new SelectElement(Year); DropYear.SelectByValue("2020"); CheckedSpecialOffer.Click(); AddressFirstName.SendKeys("Nadeem"); AddressLastName.SendKeys("Digital"); Company.SendKeys("Test Digital Company"); Address1.SendKeys("Leeds Town"); Address2.SendKeys("LS1"); City.SendKeys("Leeds"); SelectElement DropDown = new SelectElement(State); DropDown.SelectByText("Florida"); PostCode.SendKeys("00012"); AdditionalInfo.SendKeys("This is first programme of testig"); MobileNo.SendKeys("123456789"); AddressFutureRef.SendKeys("NB_Test"); ClickRegisterUser.Click(); //AC 4.4 verify account namme Assert.AreEqual("Nadeem Digital", VerifyUser.Text); Console.WriteLine(VerifyUser.Text + " Displayed"); Bpage.Imp_wait(); //AC 4.3 verify user taken to MY ACCOUNT page Assert.IsTrue(Pageheading.Displayed); Console.WriteLine(Pageheading.Text + " Displayed"); SignOut.Click(); }
public void FillShippingInfo(ClientInfo clientInfo) { SwitchToShippingFrame(); CountryDropDown.SelectByText(clientInfo.Country); FirstName.SendKeys(clientInfo.FirstName); LastName.SendKeys(clientInfo.LastName); Address1.SendKeys(clientInfo.Address1); City.SendKeys(clientInfo.City); Zip.SendKeys(clientInfo.Zip); Phone.SendKeys(clientInfo.Phone); Email.SendKeys(clientInfo.Email); Driver.SwitchTo().DefaultContent(); }
public void FillInfo(ClientInfo clientInfo) { FirstName.SendKeys(clientInfo.FirstName); LastName.SendKeys(clientInfo.LastName); Username.SendKeys(clientInfo.Username); Email.SendKeys(clientInfo.Email); Address1.SendKeys(clientInfo.Address1); Address2.SendKeys(clientInfo.Address2); Country.SelectByIndex(clientInfo.Country); State.SelectByIndex(clientInfo.State); Zip.SendKeys(clientInfo.Zip); CardName.SendKeys(clientInfo.CardName); CardNumber.SendKeys(clientInfo.CardNumber); CardExpiration.SendKeys(clientInfo.CardExpiration); CardCVV.SendKeys(clientInfo.CardCVV); ClickSubmitButton(); }
public void FillForm(FormModel user) { FirstNameField.SendKeys(user.FirstName); LastNameField.SendKeys(user.LastName); PasswordField.SendKeys(user.PasswordField); Address1.SendKeys(user.Address1); City.SendKeys(user.City); State.Click(); SelectElement stateValue = new SelectElement(State); stateValue.SelectByIndex(user.State); ZipCode.SendKeys(user.ZipCode.ToString()); MobilePhone.SendKeys(user.MobilePhone.ToString()); AssignAnAddresAlias.SendKeys(user.AssignAnAddresAlias); ScroolTo(RegisterButton).Click(); }
public void EnterInvalidDetail() { SignInBtn.Click(); EmailAddress.SendKeys("*****@*****.**"); BasePage.driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(10); CreateAcccontBtn.Click(); Gender.Click(); // first name and last name not entered to get the error FirstName.SendKeys(""); LastName.SendKeys(""); Password.SendKeys("123qwe"); SelectElement DropDay = new SelectElement(Day); DropDay.SelectByValue("10"); SelectElement DropMonth = new SelectElement(Month); DropMonth.SelectByValue("9"); SelectElement DropYear = new SelectElement(Year); DropYear.SelectByValue("2020"); CheckedSpecialOffer.Click(); AddressFirstName.SendKeys("Nadeem"); AddressLastName.SendKeys("Digital"); Company.SendKeys("Test Digital Company"); Address1.SendKeys("Leeds Town"); Address2.SendKeys("LS1"); City.SendKeys("Leeds"); SelectElement DropDown = new SelectElement(State); DropDown.SelectByText("Florida"); PostCode.SendKeys("00012"); AdditionalInfo.SendKeys("This is first programme of testig"); MobileNo.SendKeys("123456789"); AddressFutureRef.SendKeys("NB_Test"); ClickRegisterUser.Click(); //AC 4.2 verify the error message Assert.IsTrue(CreatAnAccoutError.Displayed); Console.WriteLine(CreatAnAccoutError.Text + " Displayed"); }
public void Create_AccountPage() { Fname.SendKeys("Testing"); Lname.SendKeys("Guru"); Email.SendKeys("*****@*****.**"); TelePhone.SendKeys("07777777"); Fax.SendKeys("012345"); Company.SendKeys("IT_Tech"); Address1.SendKeys("BFD"); Address2.SendKeys("city road"); City.SendKeys("Leeds"); //DropDown list for Country SelectElement DropDown2 = new SelectElement(Country_UK); DropDown2.SelectByText("United Kingdom"); BasePage.driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(10); //DropDown list for State/Region SelectElement DropDown1 = new SelectElement(RegionState); DropDown1.SelectByText("West Yorkshire"); BasePage.driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(10); ZipCode.SendKeys("12345"); CountryDropDownClick.Click(); //Country_UK.Click(); LoginName.SendKeys("tguru2713"); Password.SendKeys("123qwe"); ConfirmPass.SendKeys("123qwe"); Suscribe.Click(); TermsCondition.Click(); ContinueBtn1.Click(); ContinueBtn2.Click(); //Assert.IsTrue }