public void ContactUsFormIsSentCorrectly() { ContactUsPage contactUsPage = navigationSteps.NavigateContactUs(); contactUsPage.FillContactUsForm(ContactUsPage.Options.ByText, "Customer service", "*****@*****.**", "1234", @"D:\prueba\FilePlano.txt", "my message"); string actualMessage = contactUsPage.GetConfirmationMessage(); string expectedMessage = "Your message has been successfully sent to our team."; Assert.AreEqual(expectedMessage, actualMessage); }
public void ContactUsFormIsSentCorrectly() { ContactUsPage contactUsPage = navigationSteps.NavigateToContactUs(); //explicit waiter //Thread.Sleep(TimeSpan.FromSeconds(20)); //explicit waiter with expected conditions contactUsPage.FillContactUsForm(ContactUsPage.Options.ByText, "Customer service", "*****@*****.**", "1234", @"C:\File.txt", "my message"); string actualMessage = contactUsPage.GetConfirmationMessage(); string expectedMessage = "Your message has been successfully sent to our team."; //expected data Assert.AreEqual(expectedMessage, actualMessage); }
public void MyFirstTest() { //navigate to automationpractice webDriver.Navigate().GoToUrl("http://automationpractice.com/index.php"); MenuPage menuPage = new MenuPage(webDriver); menuPage.ClickContactUs(); ContactUsPage contactUsPage = new ContactUsPage(webDriver); contactUsPage.FillContactUsForm(ContactUsPage.Options.ByText, "Customer service", "*****@*****.**", "1234", @"C:\txt.txt", "test message"); string actualMessage = contactUsPage.GetConfirmationMessage(); string expectedMessage = "Your message has been successfully sent to our team."; //expected Assert.AreEqual(expectedMessage, actualMessage); }
// verifica que el formulario de customer service se envia correctamente public void ContactUsFormIsSendCorrectly() { //navigate to automation practice site // webDriver.Navigate().GoToUrl("http://automationpractice.com/index.php?"); /* MenuPage menuPage = new MenuPage(webDriver); * menuPage.ClickContactUs();*/ ContactUsPage contactUsPage = navigationSteps.NavigateToContactUs(); //waiter for time Thread.Sleep(TimeSpan.FromSeconds(10)); //waiter for expected conditions //ContactUsPage contactUsPage = new ContactUsPage(webDriver); contactUsPage.FillContactUsForm(ContactUsPage.Options.ByText, "Customer service", "*****@*****.**", "1234", @"C:\test.txt", "Hola, compraste esto"); string actualMessage = contactUsPage.GetConfirmationMessage(); string expectedMessage = "Your message has been successfully sent to our team."; Assert.AreEqual(expectedMessage, actualMessage); }