public void ShouldCheckSelectedBookName() { var driver = new ChromeDriver(); driver.Navigate().GoToUrl(testUrl); string firstName = "Mark", lastName = "Twain", street = "Garden", town = "London"; var personalDataPage = new PersonalDataPage(driver); personalDataPage.FirstNameInput.SendKeys(firstName); personalDataPage.LastNameInput.SendKeys(lastName); personalDataPage.NextButton.Click(); var addressPage = new AddressPage(driver); addressPage.StreetInput.SendKeys(street); addressPage.TownInput.SendKeys(town); addressPage.NextButton.Click(); var finalPage = new FinalPage(driver); Assert.AreEqual(finalPage.FirstName.Text, firstName); Assert.AreEqual(finalPage.LastName.Text, lastName); Assert.AreEqual(finalPage.Street.Text, street); Assert.AreEqual(finalPage.Town.Text, town); driver.Quit(); }
public void ShouldCheckSelectedBookName() { var driver = new ChromeDriver(); driver.Navigate().GoToUrl(testUrl); string firstName = "Mark", lastName = "Twain", street = "Garden", town = "London"; var personalDataPage = new PersonalDataPage(driver); personalDataPage.FirstNameInput.SendKeys(firstName); personalDataPage.LastNameInput.SendKeys(lastName); personalDataPage.NextButton.Click(); Assert.AreEqual(driver.Url, "https://suvroc.github.io/selenium-mail-course/04/workshop1.html?firstName=Mark&lastName=Twain"); var addressPage = new AddressPage(driver); addressPage.StreetInput.SendKeys(street); addressPage.TownInput.SendKeys(town); addressPage.NextButton.Click(); Assert.AreEqual(driver.Url, "https://suvroc.github.io/selenium-mail-course/04/workshop2.html?firstName=Mark&lastName=Twain&street=Garden&town=London"); var finalPage = new FinalPage(driver); Assert.AreEqual(finalPage.FirtsNameText.Text, firstName); Assert.AreEqual(finalPage.LastNameText.Text, lastName); Assert.AreEqual(finalPage.StreetText.Text, street); Assert.AreEqual(finalPage.TownText.Text, town); driver.Quit(); }